NEW
Font size
WorksheetsC Quizz Day 1
Total questions: 25
Worksheet time: 28mins
All keywords in C are in ____________
Lowercase
Uppercase
Camelcase
None of these
A translator which reads an entire program written in a high level language and converts it into machine language code is:
Assembler
Compiler
Linker
Loader
Which is valid C variable declarations?
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
Which is variable declaration?
int a,b;
c=a+b;
printf("%d%d",a,b)
scanf("%d%d",&a,&b);
how to print a and b variable of int and float respectively
scanf("%d%f",&a,&b);
printf("%d%f",a,b);
printf("%f%d",&a,&b);
printf("%f%d",&a,&b);
Which of the following is not a valid variable name declaration?
int a3;
int 3a;
int _A3;
int a_3
What will be the output of the C code?
Hello World! x;
Hello World! followed by a junk value
Compile time error
Hello World!
What will be the output of the following C code?
hello 5
Error
Nothing
Junk value
How many number of bytes used for float Data type?
8
4
16
32
Which specifier is suitable for character data type?
%c
%d
%f
%e
How many number of Keywords available in C Programming?
32
45
55
56
format specifier of int
%i
%c
%d
%b
syntax of printf() in C
printf("%format specifier",&variable);
printf("%format specifier",variable);
'printf(%format specifier,"variable");
printf("%format specifier,&variable");
Which is output function in C
int
%d
scanf()
printf()
What will happen when the following code is executed?
void main()
{
printf("MIET");
main();
}
Wrong statement
It will keep on printing MIET
It will print MIET once
None of these
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 will the result of 'num' variable after execution of the following statements?
int num = 58;
num % = 11;
3
5
8
11
#include<stdio.h>
int main()
{
int a=4,b,c;
b = --a;
c = a--;
printf("%d %d %d",a,b,c);
return 0;
}
3 3 2
2 3 2
3 2 2
2 3 3
What will the result of len variable after execution of the following statements?
int len;
char str1[] = {"39 march road"};
len = strlen(str1);
11
12
13
14
C is _______ type of programming language ?
Object Oriented
Procedural
Bit level language
Functional
Which one of the following is a loop construct that will always be executed once?
for
while
switch
do while
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
Which operator connects the structure name to its member name?
-
=
.
>>
The starting point of C execution at
==
main()
function()
!=
What is the output of this statement "printf("%d", (a++))" ?
The value of (a + 1)
The current value of a
Error message
Garbage
