Sample questions
1. Is C Language High Level Language or Low level Language
a)High Level
b)Low Level
c)Middle Level
d)None of the above
2.Each C statement gets terminated with the notation
a)None of the Above
b) ;
c) %
d) $
3.Which of the following denote primary data types in C program?
a)int
b) char
c) float
d) All the Above
4. What is the output of the following C program?
main()
int a=10;
int b;
b=a++ + 20;
printf("a=%d b=%d",a,b);
Speed IT viewer | +94
a) None of the below
b) a=11 b=30
c) a=10 b=30
d) a=11 b=31
5. Which of the following denote library functions in C?
a) scanf
b) printf
c) Both A and B
d)None of the Above
6. What is the output of the following program?
main()
int exf=25;
int test;
test=++exf++;
printf("exf=%d test=%d", exf, test);
a) exf=26 test=25
b) exf=27 test=26
c) Gives Error
d) exf=26 test=26
7. Which of the following denote invalid variable names in C?
a) exforsys
Speed IT viewer | +94
b) float
c) abcd
d) None of the Above
8. Which of the following denotes a new line character in C program?
a) \n
b) /n
c) t
d) /t
9. Which of the following data type occupied 1 byte?
a) long double
b) char
c) float
d) double
10. What will be output if you will execute following c code?
#include<stdio.h>
int main(){
int num,a=5;
num=++a;
printf("%d %d",num,a);
return 0;
(A)5 5
(B)6 6
Speed IT viewer | +94
(C)7 7
(D)5 6
11. Find the output of following c code.
#include<stdio.h>
int main(){
int i=1,j=2,k=3;
if(i==1)
if(k==2)
if(j==3){
printf("ok");
else
printf("bye");
return 0;
(A) ok
(B) bye
(C) okbye
(D) None of these
12. int testarray[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
What value does testarray[2] in the sample code above contain?
A. 3
B. 5
C. 7
Speed IT viewer | +94
D. 9
13. int testarray[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
What is the value of testarray [] size?
A. 3
B. 5
C. 9
D. 8
14. Which is the E.g. for Post Increment?
a) c+=5; b) ++c;
c) c=+5; d) c++;
15. Which statement will decide whether the number is an even number or not?
a) if (num=0) b) if (num%2)
c) if (num%2= =0) d) if (num%2= =1)
16. AND, OR, NOT are called
a) Relational operators b) logical operators
c) Arithmetic operators d) Variables
17. What is the typing specifier for an integer field?
a) %c b) %s c) %f d) %u e) %d
Part 02
Explain below coding in your own words?
Eg: what are the variables and data type, functions, conditions, etc…?
#include <stdio.h>
#include <conio.h>
Speed IT viewer | +94
void main()
char name[20];
int x,m;
clrscr();
printf("enter student no:");
scanf("%d",&x);
printf("enter student name:");
scanf("%s",name);
printf("enter marks:");
scanf("%d",&m);
printf("student no: %d",x);
printf("\nstudent name: %s",name);
printf("\nmarks: %d",m);
if(m>=80){
printf("\nGRADE A");
else if(m>=60){
printf("\nGRADE B");
else if(m>=50){
printf("\nGRADE C");
Speed IT viewer | +94
else if(m>=40){
printf("\nGRADE S");
else if(m<40){
printf("\nGRADE F");
getch();
2. What do you mean programming language and explain programming categories?
3. Write importance of C language?
4. Explain structure of C programming?
Speed IT viewer | +94