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 5248

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 10545

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

3 8882

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 8442

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

3 4902

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 7699

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 6080

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

7 5570

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

TCS, Accenture,

9 9666

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.'%')

22 47304

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)

Wipro, NetApp, PTU,

1 5018

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


3 10672

Add 2 64 bit numbers on a 32 bit machine

NetApp, EMC, Hyderabad Central University,

3 14427

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

9 29046

Post New C Questions

Un-Answered Questions { C }

void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply


about c language


write a program to print data of 5 five students with structures?


how to build a exercise findig min number of e heap with list imlemented?


how we can make 3d venturing graphics on outer interface


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc


c language interview questions & answer


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent


write a program for the normal snake games find in most of the mobiles.


what is ur strangth & weekness


Can you think of a logic behind the game minesweeper.


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.