wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Technical Quiz

Total questions: 84

Worksheet time: 1hrs 6mins

Name
Class
Date
1.

Question Mark Colon Operator.?

a)

A) Comparison Operator

b)

B) If-Else Operator

c)

C) Binary Operator

d)

D) Ternary Operator

2.

There are ___ storage classes in C

a)

2

b)

4

c)

6

d)

8

3.

Which is the incorrect form of variable?

a)

sale20

b)

Name

c)

12Rno

d)

Net_Salary

4.

What is the default C Storage Class for a variable?

a)

static

b)

auto

c)

register

d)

extern

5.

To find reminder _____ operator is use in C program

a)

%

b)

@

c)

/

d)

|

6.

Using if  else statement we can check _____ condition.

a)

1

b)

2

c)

3

d)

4

7.

Switch statement checks only _____ condition.

a)

Equality

b)

Not equal to

c)

Less than

d)

Greater than

8.

Which one of following is not a reserved keyword in C?

a)

auto

b)

main

c)

case

d)

default

9.

The printf() & scanf() function come from _____ header file.

a)

conio.h

b)

stdio.h

c)

math.c

d)

getio.h

10.

Static Storage class has _____ initial value.

a)

0

b)

1

c)

2

d)

3

11.

There are _____ keywords in C.

a)

30

b)

31

c)

32

d)

33

12.

Which statement is incorrect about Identifier?

a)

They can contain alphabets, digits & underscore only

b)

The identifier is made up of 31 character.

c)

They can use keyword.

d)

The first character must be an alphabet & underscore.

13.

To print multiple character _____ formatting character use.

a)

%d

b)

%f

c)

%s

d)

%c

14.

C Language is developed at ___________?

a)

AT & T's Bell Laboratories of USA in 1972

b)

AT & T's Bell Laboratories of USA in 1970

c)

Sun Microsystems in 1973

d)

Cambridge University in 1972

15.

Which one of the following is not a valid identifier?

a)

_examveda

b)

1examveda

c)

exam_veda

d)

examveda1

16.

Which of the following is not a correct variable type?

a)

float

b)

real

c)

int

d)

char

17.

int main()

{

int a = 10, b = 25;

a = b++ + a++;

b = ++b + ++a;

printf("%d %d n", a, b);

}

a)

36 64

b)

35 62

c)

36 63

d)

30 28

18.

int main ()

{

int x = 24, y = 39, z = 45;

z = x + y;

y = z - y;

x = z - y;

printf ("%d %d %d", x, y, z);

}

a)

24 39 63

b)

39 24 63

c)

24 39 45

d)

39 24 45

19.

#include <stdio.h>

int main()

{

signed char chr;

chr = 128;

printf("%d\n", chr);

return 0;

}

a)

128

b)

0

c)

-128

d)

Garbage Value

20.

Identify the output of the program

a)

3, 3, 3

b)

2, 2, 3

c)

4, 2, 3

d)

2, 3, 3

21.

Which of the following is more appropriate for reading in a multi-word string?

a)

scanf()

b)

printf()

c)

puts()

d)

gets()

22.

Find the output of the program

a)

Compilation error

b)

55 40 10

c)

55 55 55

d)

1 40 1

e)

0 40 1

23.

Find the output of the program

a)

5, 3, 20

b)

3, 3, 20

c)

3, 2, 15

d)

5, 2, 15

24.

Find the output of the program

a)

b=100 c=200

b)

b=100 c=garbage value

c)

b=garbage value c=200

d)

b=300 c=200

25.

#include<stdio.h>


int main()

{

printf("%d", -11%2);

}

a)

1

b)

-1

c)

-5.5

d)

5.5

26.
We want to round off x, a float, to an int value, The correct way to do is
a)
y = (int)(x + 0.5)
b)
y = int(x + 0.5)
c)
y = (int)x + 0.5
d)
y = (int)((int)x + 0.5)
27.
Which of the following is the correct operator to compare two variables?
a)
:=
b)
=
c)
equal
d)
==
28.

Program is a list of_______________, written in a _______________________ to determines the behaviour of a machine.

a)

word, english

b)

instructions , programming language

c)

instructions, word

29.

A flowchart is a graphical representation that helps programmer to develop algorithms in programming.

a)

True

b)

False

30.

C programming consists of two section which are _________________ and ___________________

a)

Pre-processor directives ; Main function

b)

Pre-processor directives ; end statement

c)

statements ; Main function

31.
Which function is correct?
a)

void function () { }

b)

function [] { }

c)
function ( { } )
d)
void function [ ] ( )
32.
To add a certain amount (often 1), once or many times
a)
Increment
b)
Decrement
c)
Decompose
d)
Automate
33.
Transforming actions into a symbolic language
a)
Program
b)
Coding
c)
Programming
d)
Debugging
34.
a)

C

b)

NODE

c)

PHYTON

d)

RUBY

35.
a)

JAVA

b)

PHP

c)

JAVASCRIPT

d)

RUBY

36.
a)

JAVA

b)

JAVASCRIPT

c)

C++

d)

OBJECTIVE-C

37.
a)

JAVA

b)

JAVASCRIPT

c)

PHYTON

d)

RUBY

38.
a)

NODE.JS

b)

RUBY

c)

C++

d)

PHYTON

39.

a)

JAVASCRIPT

b)

PHP

c)

ANGULARJS

d)

PHYTON

40.
a)

RUBY

b)

C

c)

C++

d)

PHP

41.
a)

RUBY

b)

OBJECTIVE-C

c)

JAVA

d)

JAVASCRIPT

42.
a)

C

b)

C++

c)

JAVA

d)

RUBY

43.

What will happen when the following code is executed?

void main()

{

printf("MIET");

main();

}

a)

Wrong statement

b)

It will keep on printing MIET

c)

It will print MIET once

d)

None of these

44.

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)

a = 10, c = 10

b)

a = 11, c = 10

c)

a = 10, c = 11

d)

a = 11, c = 11

45.

What will be the output of the following code?

#include <stdio.h>

int main()

{

int *ptr, a = 10;

ptr = &a;

*ptr += 1;

printf("%d,%d/n", *ptr, a);

}

a)

10, 10

b)

10, 11

c)

11, 10

d)

11, 11

46.

What will be the output of the C code?

a)

Hello World! x;

b)

Hello World! followed by a junk value

c)

Compile time error

d)

Hello World!

47.

The format identifier ‘%i’ is also used for _____ data type.

a)

char

b)

int

c)

float

d)

double

48.

What will be the output of the following C code?

a)

Hi is printed 9 times

b)

Hi is printed 8 times

c)

Hi is printed 7 times

d)

Hi is printed 6 times

49.

Which of the following correctly shows the hierarchy of arithmetic operations in C?

a)

/ + * -

b)

* - / +

c)

+ - / *

d)

/ * + -

50.

To print out 'a' as an integer and 'b' as a decimal, which of the following printf() statement will you use?

a)

printf("%f %lf", a, b)

b)

printf("%f %f", a, b)

c)

printf("%d %f", a, b)

d)

printf("%f %d", a, b)

51.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
52.
What is the difference between a flowchart and pseudocode? 
a)
A flowchart is diagramatic whilst pseudocode is written in a programming language (eg. Pascal or Java) 
b)
A flowchart is textual but pseudocode is diagrammatic 
c)
A flowchart is a diagrammatic description of an algorithm whilst pseudocode is a textual description of an algorithm 
d)
A flowchart and pseudocode are the same thing 
53.

Which picture can be best described as the principle of "algorithm"?

a)
b)
c)
d)
54.
If ................then ....else ........endif  check
a)
0ne condition
b)
two conditions
c)
threee condtions
d)
many conditions
55.
Another word for repetition
a)
iteration
b)
flow
c)
input
d)
control flow
56.

When was the C Language developed?

a)

1970

b)

1972

c)

1975

d)

1976

57.

What is the result of 6%4 ?

a)

4

b)

3

c)

2

d)

1

58.

else is a --------------------------

a)

variable

b)

identifier

c)

datatype

d)

keyword

59.

The Unary operator is -----------------------------

a)

>>

b)

++

c)

<<

d)

==

60.

Case label in switch() should not be -----------------------

a)

floating point

b)

integer

c)

long integer

d)

all above

61.

Every switch() statement should have one ------------- label

a)

default

b)

while

c)

for

d)

all above

62.

1 GB is equal to ------------

a)

1024KB

b)

1024 Byte

c)

1024MB

d)

1024 nano

63.

No --------------- is allowed in variable

a)

+ sign

b)

- sign

c)

0

d)

Blank space

64.

#include<stdio.h>

int main()

{

int a=2,b=7,c=10;

c=a==b;

printf("%d",c);

}

a)

0

b)

7

c)

2

d)

Compilation error

65.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

}

while(a <= 30);

return 0;

}

a)

32

b)

33

c)

30

d)

No Output

66.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

if(a > 35)

break;

}

while(1);

return 0;

}

a)

No Output

b)

32 33 34

c)

32 33 34 35

d)

Compiler error

67.

What is the output of C Program.?

int main()

{

int k;

for(;;)

{

printf("TESTING\n");

break;

}

return 0;

}

a)

No Output

b)

TESTING

c)

Compiler error

d)

None of the above

68.

What is the way to suddenly come out of or Quit any Loop in C Language.?

a)

continue; statement

b)

break; statement

c)

leave; statement

d)

quit; statement

69.

What is the output of C Program.?

int main()

{

int a=5;

while(a=123)

{

printf("RABBIT\n");

break;

}

printf("GREEN");

return 0;

}

a)

GREEN

b)

RABBIT GREEN

c)

RABBIT is printed unlimited number of times.

d)

Compiler error.

70.
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
a)
rem = 3.14 % 2.1;
b)
rem = modf(3.14, 2.1);
c)
rem = fmod(3.14, 2.1);
d)
Remainder cannot be obtain in floating point division
71.
In which order do the following gets evaluated
1.Relational
2.Arithmetic
3.Logical
4.Assignment
a)
2134
b)
1234
c)
4321
d)
3214
72.
The modulus operator cannot be used with a long double.
a)
True
b)
False
73.

What does the following code fragment write to the monitor?

a)

Under

b)

Over

c)

Under the limit

d)

Over the limit

74.

Evaluate(to true or false) each of the following expressions:

(1) 14 <= 14

(2) 14 < 14

a)

false false

b)

true true

c)

true false

d)

false true

75.

Determine the value of this expression using integer arithmetic:

5 % 7

a)

0

b)

2

c)

5

76.

Determine the value of b in this code fragment:

int a=3, b;

b=++a;

a)

3

b)

4

c)

2

77.

Determine the value of a in the second line of the code fragment:

int a=1, b=2;

a=b--;

a)

1

b)

0

c)

2

78.

C language is a

a)

structured program

b)

object oriented program

c)

oriented program

d)

basic program

79.

a=2;b=6; (a<b):10:15

a)

10

b)

15

c)

2

d)

6

80.

Determine the value of the expression using integer arithmetic:

6 * 9 % 3 / 2

a)

2

b)

0

c)

18

81.

What is the EXACT output from this code fragment:

int num=10;

if(num> 7 % 3 / 2 * 3)

printf("This is True");

else

printf("This is False");

a)

This is True

b)

This is False

82.

How many times CppBuzz.com is printed?

int main()

{

int a = 0;

while(a++);

{

printf("CppBuzz.com");

}


return 0;

}

a)

0 time

b)

1 time

c)

Compilation Error

d)

Infinite times

83.

How many times CppBuzz.com is printed on console?

int main()

{

int a = 0;

while(a++)

{

printf("CppBuzz.com");

}


return 0;

}

a)

Nothing is printed on screen

b)

0 time

c)

1 time

d)

Infinite times (Untill Stack overflow)

84.

What is output of below program?


int main()

{

int i,j,count;

count=0;

for(i=0; i<5; i++);

{

for(j=0;j<5;j++);

{

count++;

}

}

printf("%d",count);

return 0;

}

a)

55

b)

54

c)

1

d)

0