Answer Posted / parasher
char *p;
p = (char *)malloc(sizeof(char));
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is meant by inheritance?
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. The Logic should be written in Data Structures?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What are the disadvantages of a shell structure?
Can you assign a different address to an array tag?
When is a “switch” statement preferable over an “if” statement?
What is the meaning of c in c language?
What is a example of a variable?
differentiate built-in functions and user – defined functions.
What are predefined functions in c?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is pointer to pointer in c?
How can I trap or ignore keyboard interrupts like control-c?
Which is better malloc or calloc?