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 ].
1137Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
1131Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
1469Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
1106GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
1155
What are the rules for the identifier?
Is there any demerits of using pointer?
How can I call fortran?
Can a pointer be null?
What is the difference between declaring a variable and defining a variable?
Explain the Difference between the New and Malloc keyword.
Explain what is the stack?
In which layer of the network datastructure format change is done
Write a program to print “hello world” without using semicolon?
How can a program be made to print the line number where an error occurs?
what do the 'c' and 'v' in argc and argv stand for?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
what type of questions arrive in interview over c programming?
What are preprocessor directives in c?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }