f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
Answer Posted / prasad
it prints BYE on screen!!!
| Is This Answer Correct ? | 15 Yes | 1 No |
Post New Answer View All Answers
What are c identifiers?
What are the types of bitwise operator?
What is dangling pointer in c?
What is a pointer variable in c language?
Explain what is page thrashing?
Why & is used in scanf in c?
simple program of graphics and their output display
How do you list files in a directory?
Explain what is the difference between far and near ?
What does sizeof function do?
What are the valid places to have keyword “break”?
can any one provide me the notes of data structure for ignou cs-62 paper
How to set file pointer to beginning c?
What is the difference between variable declaration and variable definition in c?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?