Free for PREMIUM members
[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now
range = end_addr-start_addr
char* p = malloc(range);
strncpy(p, res1, range);
strcat(p, '\0'); /* this causes segmentation error !*/
Open in new window
char* p = '\0';
p = ((char*) malloc(range));
strncpy(p, start_addr, range);
//now the string is pointed by p.
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!