1.
What does the compiler do?
a.
Convert assembly code into
machine code.
b.
Convert preprocessed source
code into user code.
c.
Convert machine code into
assembly code.
d.
Convert preprocessed
source code to machine language.
2.
The format identifier %d is
used for _ data type?
a.
Char
b.
Int
c.
Float
d.
double
3.
Which looping process checks
the test condition at the end of the loop?
a.
For
b.
While
c.
Do-while
d.
Nested loop
4.
What is the output of this
code?
Void main(){double k=0;
For(k =0.0; k<3.0;k++)
Printf(“Hello”);}
a.
Run time error
b.
Hello is printed twice
c.
Hello is printed thrice
d.
Hello is printed infinitely
5.
Which of the symbol are
separated to pass the multiple arguments in function?
a.
Comma ( , )
b.
Semicolon ( ; )
c.
Colon ( : )
d.
Period ( . )
6.
If a=11.0, what is the result
of expression r=a++/2?
a.
6
b.
5
c.
5.5
d.
Undefined
7.
What is the symbol used for
designating conditions in flowchart?
a.
Rectangle
b.
Diamond
c.
Parallelogram
d.
Hexagon
8.
Which of the following loop
guarantees to execute at least once?
a.
For loop
b.
While loop
c.
Do-while loop
d.
Non of the above
9.
Which of the following is
incorrect function prototype?
Syntax of prototype function/*returntype
function name (datatype1 expression 1, datatype2 expression 2*/
a.
Int calc (int,int);
b.
Void calc ( int x, int y);
c.
Void calc (int, int)
d.
Void calc (x,y);
10.
Which of the programming
language uses mnemonics?
a.
Machine language
b.
High level language
c.
Assembly language
d.
GL
11.
Which of the following is
correct comment?
a.
*/comments*/
b.
/*comments*/
c.
**comments**
d.
{comments}
12.
Which of the following control
structure NOT used break keyword generally?
a.
Do-while
b.
If-else
c.
For
d.
while
1.
What
are different type of operator in C?
Different type of operators in C are
a.
Arithmetic
b.
Relational
c.
Logical
d.
Increment/decrement
e.
Assignment
f.
Bitwise
2.
Define is function?
A function is a block of code that performs a specific
task. For example Suppose, you need to create a circle and color it depending
upon the radius and color. You can create two functions to solve this problem:
a. createCircle()
function
b. color()
function
3.
Define binary and unary operator?
Unary operators are arithmetic operators
that performs action on a single operand. For example logical not(!).
Binary operators are arithmetic operators
that performs action on a two operand. For example logical and(&&) and
logical or (||).
4.
What is use of break statement?
A break statement terminates the execution of the loop (while
or do-while or for) and the control is transferred to the statement immediately
following the loop. When a break is encountered in the program, remaining part
of the block is skipped and the loop is terminated passing control out of the
loop
5.
What is operator?
Operators are special symbols which cause
to perform mathematical or logical operations.
Following are the symbols used for arithmetic
operators in C.
Operators meanings
(+) addition
(-) Subtraction
(/) division
(*) multiplication
(%) reminder
6.
What are different type of control
structure in C?
The structure those regulates the order in
which program statements are executed are called control structures. There are
three types
a.
Sequential structure
b.
Selective structure
c.
Repetitive structure
7.
What is variable in C?
Variables are entities whose value may
change throughout the program execution. Variables are used to store values
that are used in computation.
Syntax:
Data_type variable name, Data_type2,………,
Data_typen;
No comments:
Post a Comment