Sunteți pe pagina 1din 1

Authorized

Learning Centre Of

For(int i=0;i<2;i++)
{

SMU

Part - I
1) C is a
a) high level language
language
c) object based language
these

Printf(%d,i);
b) low level

d) none of

}
a) 01
c) error

2) printf() belongs to
a) ctype.h
b)string.h
d) stdio.h
d) conio.h
3) printf(%d,printf(my first c program))
Will show the output
a) 18
b) 15
c) will generate error
d) none if these
4) int is a
a) keyword
b)identifier
c) data type d) none of these
5) \r is used for
a) backspace
c) tab

b)carriage return
d) new line

6) how many data types do we have in C


a) 3b) 2
c) 1 d) 4
7) && is
a) bitwise operator
c) AND
8) ++I is
a) preincrement operator
increment operator
c) predecrement operator
decrement operator

b) OR
d)none of these
b) post
b) post

9) int x,a=4;
x=(a>=4)?2:3;
shows that
a) 0
b) 3
c) 2
d)1
10) integer takes
a) 4 bytes
b) 1 bytes
c) 2 bytes
d) 0 bytes
11) Formal Parameter is declared in
a) function prototype
b) function definition
c) function calling
d) none of this
12) In UNION we can access
a) 2 members atatime
b) 1 member atatime
c) all variables atatime d) none of this
12) find the output
main()
{
Int i=2;
Printf(%d,i++);
Printf(%d,++i);
}
a) 2,2
b) 2,4
c)2,3
d) none of this
13) find the errors:
main()
{

b) 012
d) 0

14) find the errors:


main()
{
Int i=2;
If(i>2)
{
Printf(%d,i);
}
else
{
Printf(%d,i
}
}
a) 2b) statement missing
c) 1 d) none of these
15) find the output:
main()
{
Int i=2;
Switch(i)
{
Case 1: i++;
Break;
Case 2:++I;
Break;
Case >3: break;
}
Printf(%d,i);
}
a) 2b) 3
c) 4 d) error will be generated
16) find the errors:
main()
{
Printf(%d,printf(smu bowbazar.));
}
a) 12 b)13
c) error will be generated
d) none of
these
17) break is used to
a) exit from if
b) exit from loop
c) exit from switch d) none of these
18) a=a+1 is same
a) a=+1
b)a=+1
c) a++
d)++a
19) array is a collection of
a) heterogeneous elements b) homojeneous
elements
c) both
d) none of
these
20) >= is
a) relational operators
b) logical operators
c) bitwise operators d) conditional operator

S-ar putea să vă placă și