C Interview Questions
Questions Answers Views Company eMail

To what value are pointers initialized? 1) NULL 2) Newly allocated memory 3) No action is taken by the compiler to initialize pointers.


4 7858

Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort

7 14233

Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 11802

Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 16606

What character terminates all strings composed of character arrays? 1) 0 2) . 3) END

3 6741

True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 13746

Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work

2 11637

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ 3) char x=12;

7 8641

void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case

Accenture, TCS,

9 15678

if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')

23 71937

in iso what are the common technological language?


Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)

NetApp, PTU, Wipro,

1 6112

what is the diff b/w static and non static variables in C. Give some examples plz.


3 12929

Add 2 64 bit numbers on a 32 bit machine

EMC, Hyderabad Central University, NetApp,

3 16237

Write a program to accept a character & display its corrosponding ASCII value & vice versa?

9 34819

Post New C Questions

Un-Answered Questions { C }

Can one function call another?


What is nested structure?


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?


Is it better to use a macro or a function?


What are register variables? What are the advantage of using register variables?


What does %p mean c?


Why pointers are used?


Write a program to identify if a given binary tree is balanced or not.


What are categories used for in c?


Give me the code of in-order recursive and non-recursive.


Write a program to swap two numbers without using a temporary variable?


What are pointers? What are stacks and queues?


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year


What are high level languages like C and FORTRAN also known as?


How do you list a file’s date and time?