Select chapter



functions (3.papers)
loops (1.papers)
arrays (2.papers)
structures (3.papers)
unions (1.papers)
pointers (7.papers)
null pointers (1.papers)
strings (2.papers)
misc c concepts (1.papers)
Data structures (5.papers)
linked lists (3.papers)
trees (1.papers)
basics (5.papers)
Hide

Sponsored Links


  

c loops interview questions and answers

Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
3
do while(1) in C:

What does below function do..
do{
 print("hello world");
}while(1);
  1. this program will print hello world for 1 time.
  2. this program will print hello world for 0 times.
  3. this program will print hello world for infinite times.
  4. it gives compile time error.
Show Answer
Share Facebook gmail Twitter
4
Sample program for using for loop in C:

What does this program do? what will be the output?
int main()
{
 int num=4,i,x=1;
 for(i=1;i<=num;i++)
 {
 x = x* i;
 }
 printf("result is %d ",x);

}
  1. This is the code to find factorial of a given number. Output for this program is factorial of 4 , i.e 24.
  2. this code is multiplying all the numbers with 4 and adding. result is 38.
  3. it gives compile time error.
  4. it is an example of infinite loop and crashes the program at run time.
Show Answer
Share Facebook gmail Twitter
5
How many iterative statements are available in c language?
  1. for
  2. for,while
  3. for,while,do-while
  4. for,while,do-while,and switch
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
15
what will happen if recursive function calls are made with out any condition to break the recursion?
  1. it gives compile time error
  2. it crashes the program
  3. nothing happens, it runs properly
  4. it depends on compiler
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Read more papers :