wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C PROGRAMMING -II INTERNALS EXAMINATIONS - SEP 2021

Total questions: 50

Worksheet time: 27mins

Name
Class
Date
1.

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!

2.

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

a)

char

b)

int

c)

float

d)

double

3.

What will be the output of the following C code?

a)

2

b)

8

c)

9

d)

10

4.

#include statement must be written __________

a)

Before main()

b)

Before any scanf() / printf()

c)

After main()

d)

It can be written anywhere

5.

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

6.

Which of the following is not a correct variable type?

a)

int

b)

real

c)

float

d)

char

7.

What punctuation is used to signal the beginning and end of code blocks?

a)

{ }

b)

-> and <-

c)

BEGIN and END

d)

( and )

8.

The "\n" character does which of the following operations?

a)

Double line spacing

b)

Character deletion

c)

Character backspace

d)

Places cursor on the next line

9.

Is the syntax for the following C statement correct?:


scanf("%d", input);

a)

True

b)

False

10.

The compiler ignores comments and they are not translated into machine language.

a)

True

b)

False

11.
Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others.
a)
Yes
b)
No
12.
How will you print \n on the screen?
a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
13.
Functions cannot return more than one value at a time
a)
True
b)
False
14.
In C all functions except main() can be called recursively.
a)
True
b)
False
15.

C language 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

16.

Is it possible to run program without main() function?

a)

yes

b)

no

c)

may be

17.

Who is Father of C Language

a)

Bjarne Stroustrup

b)

James A. Gosling

c)

Dennis Ritchie

d)

Dr. E.F. Codd

18.

C programs are converted into machine language with the help of

a)

An Editor

b)

A compiler

c)

An operating system

d)

None of these.

19.

Which one of the following is not a valid identifier?

a)

_examveda

b)

1examveda

c)

exam_veda

d)

examveda1

20.

A name having a few letters, numbers and special character _(underscore) is called

a)

keywords

b)

reserved keywords

c)

tokens

d)

identifiers

21.

Which of the following is not a valid variable name declaration?

a)

int a3;

b)

int 3a;

c)

int _A3;

d)

int a_3

22.

All keywords in C are in ____________

a)

Lowercase

b)

Uppercase

c)

Camelcase

d)

None of these

23.

A translator which reads an entire program written in a high level language and converts it into machine language code is:

a)

Assembler

b)

Compiler

c)

Linker

d)

Loader

24.

Diamond shaped symbol is used in flowcharts to show the-

a)

decision box

b)

statement box

c)

error box

d)

if-statement box

25.

Which is correct with respect to size of the data types?

a)

char > int > float

b)

int > char > float

c)

char < int < double

d)

double > char > int

26.

Which is valid C variable declarations?

a)

int my_num = 100,000;

b)

int my_num = 100000;

c)

int my num = 1000;

d)

int $my_num = 10000;

27.

The functions printf() and scanf() are defined in which of the following library file:-

a)

math.h

b)

conio.h

c)

stdio.h

d)

stdlib.h

28.

#include <stdio.h>

void main()

{

int k = 4;

float k = 4;

printf("%d", k)

}

A.

a)

4

b)

4.000000

c)

No output

d)

Compile time Error

29.

What will be the output of the following program?

#include <stdio.h>

int main()

{

float c = 5.0;

printf ("Temperature in Fahrenheit is %.2f", (9/5)*c + 32);

return 0;

}

a)

Temperature in Fahrenheit is 41.00

b)

Temperature in Fahrenheit is 37.00

c)

Temperature in Fahrenheit is 0.00

d)

Compiler Error

30.

Who developed C language

a)

Dennis Ritchie

b)

Bill Gates

c)

Dennis Lilly

d)

Stephen

31.

Which is variable declaration?

a)

int a,b;

b)

c=a+b;

c)

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

d)

scanf("%d%d",&a,&b);

32.

how to print a and b variable of int and float respectively

a)

scanf("%d%f",&a,&b);

b)

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

c)

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

d)

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

33.

1. What will be the output of the following C code?

a)

No Output

b)

TESTING

c)

Compiler error

d)

None of the above

34.

The process of removing a bug is known as

a)

Debugging

b)

Compilation

c)

Executing

d)

Running

35.

Every C Program Statement must be terminated with a

a)

.

b)

#

c)

;

d)

!

36.

n the following which one is not a C keyword?

a)

Choice

b)

Case

c)

For

d)

Volatile

37.

What does the following code fragment write to the monitor?

a)

Under

b)

Over

c)

Under the limit

d)

Over the limit

38.
How will you print \n on the screen?
a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
39.

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

40.
How to comment in C language?
a)
//Comment
b)
A & B
c)
* Comment *
d)
<---Comment---->
41.

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

a)

True

b)

False

42.

Process of writing the C source code is called as ___________________

a)

Editing

b)

LInking

c)

Executing

43.

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

44.

#include<stdio.h> is important line in c. The stdio.h contains information on input output routines.

a)

True

b)

False

45.
How do you invoke a function?
a)
function { };
b)
function[x];
c)
function();
d)
(function);
46.
Which one is a function prototype?
a)
void function ();
b)
function ();
c)
void function [];
d)
() function { };
47.
 A line that determines whether or not you run a certain chunk of code
a)
Increment
b)
Decrement
c)
If Statement
d)
Conditional 
48.
A piece of code that can be pulled over and over
a)
Function
b)
Program
c)
Simulation
d)
Interface
49.
Transforming actions into a symbolic language
a)
Program
b)
Coding
c)
Programming
d)
Debugging
50.
Instructions that can be understood and followed by a machine
a)
Data
b)
Program
c)
Automate
d)
Programming