โช Choose the correct option.
What will be result of the following program?
#include
#include
int myalloc(char *x, int n){
x= (char *)malloc(n*sizeof(char));
memset(x,,n*sizeof(char));
}
int main(){
char *g="String";
myalloc(g,20);
printf("The string is %s",g);
return 0;
}
#include
#include
int myalloc(char *x, int n){
x= (char *)malloc(n*sizeof(char));
memset(x,,n*sizeof(char));
}
int main(){
char *g="String";
myalloc(g,20);
printf("The string is %s",g);
return 0;
}