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.

Aricent,

4 8598

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 15234

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

3 12457

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 18210

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

3 7241

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 14908

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 12366

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

7 9621

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 16856

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 75290

in iso what are the common technological language?

1749

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

NetApp, PTU, Wipro,

1 6432

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

Wipro,

3 13434

Add 2 64 bit numbers on a 32 bit machine

EMC, Hyderabad Central University, NetApp,

3 16771

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

9 36101


Post New C Questions

Un-Answered Questions { C }

Write a program to reverse a given number in c?

698


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

871


Why we use int main and void main?

675


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

719


What is the difference between fread and fwrite function?

749






The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3149


What is echo in c programming?

670


Why header file is used in c?

687


The difference between printf and fprintf is ?

840


Can you write a programmer for FACTORIAL using recursion?

724


The __________ attribute is used to announce variables based on definitions of columns in a table?

828


What is static and auto variables in c?

693


Can you pass an entire structure to functions?

817


What is variable declaration and definition in c?

608


What is the difference between single charater constant and string constant?

747