Monday, November 21, 2016

Questions based on Looping in C language


  • List the looping statements available in C language.
  • Describe syntax of “for” loop with suitable example.
  • What do you mean by entry controlled and exit controlled loop in C language?
  • Giving suitable example, explain use of do….while loop to create menu under C program.
  • Briefly describe the examples of entry controlled loops of C language.
  • State the difference between while and do…while statement of C program.
  • Describe syntax of do…while statement with suitable example.
  • Write a C program to print 1, 2, 3, …..N using for loop (Read N from user).
  • Write a C program to print Z, Y, X, …….A using while loop.
  • Write a C program to print 1, 2, 4, 8, 16, 32, 64 …..N using do….while loop (Read N from user).
  • Justify the statement: “do….while loop in a C programming is one of the entry controlled loop”.
  • What do you mean by infinite loop? Give suitable of any infinite loop in a C program.
  • Predict the output of following loop:
     for( i=0; i<10; i++)
        printf(“%d”, i+2);

  • Predict the output of following loop:
     for( i=65; i < 70; i++)
        printf(“%c”, i);



More questions will be added soon….today…

* * * * *

No comments:

Post a Comment