wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

BFF2003 QUIZ(3)

Total questions: 25

Worksheet time: 18mins

Name
Class
Date
1.

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

a)

True

b)

False

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

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

4.
What punctuation is used to indicate the beginning and end of code blocks?
a)
{ }
b)
-> <-
c)
BEGIN and END
d)
( and )
5.

Process of writing the C source code is called as ___________________

a)

Editing

b)

LInking

c)

Executing

6.
How to comment in C language?
a)
//Comment
b)
A & B
c)
* Comment *
d)
<---Comment---->
7.
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)
8.
Associativity has no role to play unless the precedence of operator is same.
a)
True
b)
False
9.
How would you round off a value from 1.66 to 2.0?
a)
ceil(1.66)
b)
floor(1.66)
c)
roundup(1.66)
d)
roundto(1.66)
10.
Functions cannot return more than one value at a time
a)
True
b)
False
11.
In C all functions except main() can be called recursively.
a)
True
b)
False
12.
What is (void*)0?
a)
Representation of NULL pointer
b)
Representation of void pointer
c)
Error
d)
None of above
13.
Which one is a function prototype?
a)
void function ();
b)
function ();
c)
void function [];
d)
() function { };
14.

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

a)

True

b)

False

15.
Point out the compile time error in the program given below.
a)
Error: invalid assignment for x
b)
Error: suspicious pointer conversion
c)
No error
d)
None of above
16.
Which symbol terminates a C statement?
a)
.
b)
;
c)
,
d)
}
17.
What will be the output of the program?
a)
128
b)
Garbage value
c)
Error
d)
0
18.
Which one will return an value?
a)
give 1;
b)
rerun 2;
c)
*a = 1;
d)
return 1;
19.
Which statement will you add in the following program to work it correctly?
a)
#include<conio.h>
b)
#include<math.h>
c)
#include<stdlib.h>
d)
#include<dos.h>
20.
Which function is correct?
a)

void function () { }

b)

function [] { }

c)
function ( { } )
d)
void function [ ] ( )
21.
What will be the output of the program?
a)
Hello
b)
Hi Hello
c)
No output
d)
Infinite loop
22.
Point out the error in the following program 
a)
No error
b)
display() doesn't get invoked
c)
display() is called before it is defined
d)
None of these
23.
Point out the error in the following program
a)
Error: Declaration syntax error 'v' (or) Size of v is unknown or zero.
b)
Program terminates abnormally.
c)
No error
d)
None of these.
24.
Another way of saying "otherwise"
a)
Programming
b)
Parameters
c)
Else
d)
Increment
25.
How do you invoke a function?
a)
function { };
b)
function[x];
c)
function();
d)
(function);