Can we realloc a string inside a structure?
struct info { char name[20]; int age; char address[20]; }; struct info d[10];
I want to realloc name, how can I do it?
use char *name in place of char name[20], then in your program you can do malloc/calloc/realloac as name = malloc(25) or something similar.
I hope I understood the query correctly, if not please comment.
Convert the given string into palindrome with minimum number of appends(at end of the given string). O(n) algorithm will be appreciated ??
Input :=> Malayal Output :=> Malayalam
The output will seems like--