NEW
Font size
WorksheetsC-Programming
Total questions: 30
Worksheet time: 15mins
How many main() function we can have in a program
1
2
No Limit
None
How many loop are there in C
2
3
1
4
When is C Language was invented
1970
1972
1978
1979
Library function getch() belongs to which header file?
stdio.h
conio.h
stdlib.h
none
which of the following ways can be used to include header file in C program
#include"stdio.h"
#include<stdio.h>
both
none
What are Parameter passing techniques available in C Language
Call by value
Call by reference
Both
None
Array is collection of elements of
Dis-similarity Data Types
Similar Data Types
Both
None
structures are collection of elements of
Dis-similarity Data Types
Similar Data Types
Both
None
what are the basic data types in C Language
int , float
int , float , char
int, float, char , double
int, char, double
Arithmetic operators available in C Language are
+ , -, *, / , %
+ , -, *, / , <
+ , -, *, ==, <=
&&, ||, ==, >=
Pointer variable is to hold
int value
float value
Address
None
Examples of unconditional statements
goto , continue
goto, continue, break
break, continue
goto break
Conditional statements are
Simple if , if-else , else-if, switch
Simple if , if-else , else-if, while
Simple if , do-while , else-if, switch
Simple if , if-else , do-while , for
Program execution starts from
#include
main()
Other sub-functions
None
Conditional operator (? :) is a
Unary Operator
Binary Operator
Ternary Operator
All
Examples for Unary operators
% , /
==, &&
<= , >=
++ , --
What is output for:
a=5;
printf("%d", a++) ;
5
6
4
0
What is the Output:
int a=5;
printf("%d", ++a);
5
6
7
4
What is the output:
int i;
printf("%d", i);
0
Garbage value
1
Error
What is the Output:
int a=5,b=6,c=2;
printf("%d", a+b*c);
17
22
11
Error
What is the Output :
void main()
{
int a=5,b=6,k;
k=b>a?b:a;
printf("%d",k);
}
5
6
11
Error
what is the output:
void main()
{
int a=5;
a+=2;
printf("%d",a);
}
7
5
6
Error
What is the Output:
void main()
{
int a=4, b=2,c;
c=a*b;
printf("%d%d%d",b,c,a);
}
4, 2, 8
2, 4, 8
4, 8, 2
2, 8, 4
what is the Output:
void main()
{
int a=3,b=6;
if(a>b)
printf("%d",a);
else
printf("%d",b);
}
3
6
Compilation Error
Run Time Error
What is the technique name for the following Function call swap():
void main()
{
swap(3,7)
}
Call by value
Call by reference
Both
None
What is the Keyword used to define a Structure
Structure
Static
Dynamic
Struct
which of the following is Address operator
&&
&
||
==
"goto" statement is:
Conditional statement
Assignment statement
Declaration statement
Unconditional statement
Which of the following is a Unary Operator
&&
||
<
!
C language was developed by
B. Stroustrup
James Gosling
Anders Hejlsberg
Dennis M.Ritchie
