NEW
Font size
WorksheetsC Programming Concepts
Total questions: 25
Worksheet time: 13mins
Who developed the C language?
Ken Thompson
Bjarne Stroustrup
Dennis Ritchie
Kernighan
C program should be written in
Upper case
Title case
lower case
none of these
Every statement in a C program should end with a -------------
Colon(:)
semicolon(;)
comma(,)
fullstop(.)
What is the result of 6%4 ?
4
3
2
1
else is a --------------------------
variable
identifier
datatype
keyword
The symbol of a new line character is -----------------------
\n
\t
\d
\f
The Unary operator is -----------------------------
>>
++
<<
==
Commonly used input function is --------------
scanf()
printf()
getch()
putch()
1 GB is equal to ------------
1024KB
1024 Byte
1024MB
1024 nano
%f specifies ---------------- data type
float
int
char
string
Program needs to be converted into _________________ before running it
Assembly code
Vb.net code
Low level code
Machine code
Commonly used output function is ------------
printf()
scanf()
getch()
none of these
Compiler produces ________________ file
dynamic
executable
static
non executable
What is the result after execution of the following code if a is 10, b is 5, and c is 10?
if ((a > b) && (a <= c))
a = a + 1;
else
c = c+1;
a = 10, c = 10
a = 11, c = 10
a = 10, c = 11
a = 11, c = 11
What type of data would your name be?
Real
Boolean
Integer
String
What type of data would the letter 'K' be?
Boolean
String
Character
Real
Which of the following is a relational operator?
+
-
/
>
What will be the output of the following C code?
Run time error
7
8
Depends on compiler
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
hi
hello
no
error
which is the only function all C programs must contain?
start()
sys()
main()
scanf()
How many bits are allocated for int data type
16
8
2
1
Every C program requires
header file
main function
data declaration
All
%s indicates in scanf statement
to get an integer
to get a character
to get a string
to get a real no.
Which of the following is not a correct variable type?
float
real
int
char
