Answer Posted / shalabh
This can be done by using malloc...if u have an integer
array then ...you can ask user the size..and then allocate
memory for integers...at the run time...using malloc()
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
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 the use of static variable in c?
Can you please explain the difference between exit() and _exit() function?
What is the difference between array and linked list in c?
How can I do graphics in c?
What is an array? What the different types of arrays in c?
why return type of main is not necessary in linux
Difference between constant pointer and pointer to a constant.
Explain 'bus error'?
What are local static variables?
How can I ensure that integer arithmetic doesnt overflow?
What is difference between structure and union?
explain how do you use macro?
Explain logical errors? Compare with syntax errors.
Why do we use stdio h and conio h?