ptr=malloc(sizeof(char)*4);
if length of available characters in string is more than 4 then memory allocation to pointer cross the limit but it does not affect the output to print the string.
ptr=malloc(sizeof(char)*4);
if length of available characters in string is more than 4 then memory allocation to pointer cross the limit but it does not affect the output to print the string.
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.
It does not affect the output to print the string even if it goes/accesses out of the memory bounds allocated to it. But it may not get affected until that out of the bound memory is either not over-written by the process which owns it or it is still not allocated to any process by the operating system.