Sunteți pe pagina 1din 3

1) C is a

a) high level language


c) object based language

b) low level language


d) none of these

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
c) data type

b)identifier
d) none of these

5) \r is used for
a) backspace
b)carriage return
c) tab
d) new line
6) how many data types do we have in C
a) 3
b) 2
c) 1
d) 4
7) && is
a) bitwise operator
c) AND
8) ++I is
a) preincrement operator
c) predecrement operator

b) OR
d)none of these
b) post increment operator
b) post decrement operator

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()
{
For(int i=0;i<2;i++)
{
Printf(%d,i);
}
}
a) 01
c) error

b) 012
d) 0

14) find the errors:


main()
{
Int i=2;
If(i>2)
{
Printf(%d,i);
}
else
{
Printf(%d,i
}
}
a) 2
b) 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) 2
b) 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
c) both
20) >= is
a) relational operators
c) bitwise operators

b) homojeneous elements
d) none of these

b) logical operators
d) conditional operator

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