f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answer Posted / subbu
after correction of error, the output will be hello
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is bash c?
What is the difference between ‘g’ and “g” in C?
What are the restrictions of a modulus operator?
What is difference between main and void main?
How can you increase the size of a dynamically allocated array?
How can I read data from data files with particular formats?
Can you please explain the difference between malloc() and calloc() function?
How can I manipulate individual bits?
Can we change the value of constant variable in c?
Why c is called procedure oriented language?
Explain how can I pad a string to a known length?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Write a program to swap two numbers without using third variable in c?