value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed?
6 8784how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk.
3 9797
Define the scope of static variables.
Which one would you prefer - a macro or a function?
what do you mean by enumeration constant?
What is main function in c?
write a program to generate address labels using structures?
What is the best way to store flag values in a program?
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 ].
Explain how can I pad a string to a known length?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What is zero based addressing?
What are the 3 types of structures?
How do you list a file’s date and time?
Explain what header files do I need in order to define the standard library functions I use?
Why c is known as a mother language?
What is a null pointer in c?