Thursday, December 6, 2007

quiz 1 unit 1 & 2 continuation

81. C language has been developed by
a) Peter Norton b) martin Richards c) Ken Thomson d) Dennis Ritchie
82. The constant ‘\b’ is used for
a) tab b) backspace c) bell d) vertical blank
83. In the following which one is not a “c” key word
a) case b) choice c) volatile d) for
84. The size of operator returns the size of an operand
a) in bits b) in words c) in bytes d)in float
85. The value of 2%5 is
a) 3 b) 10 c) 0 d) 2
86. && and || are which kind of program
a) arithmetic b) logical c) bitwise d) assignment operator
87. consider the following program
main( )
{ int a=2;
printf(“%d”,a);
modify(a);
printf(“%d”,a);
}
void modify(int a)
{
d=a*3;
printf(“%d”,a);
return; }
the out put of the above program is
a) 2 66 b) 626 c) 66 2 d) 262
88. Float c, c=25/2; what is the value of c
a) 12.500000 b) 12 c) 12.0 d) 12.00000
90. Give the output of the following program
#include
main( )
{ int a, count;
int funct(int count);
for(count=1; count<=5; ++count)
{ a=funct 1(count);
printf(“%d”,a);
}
int funct(int count)
{ int y;
y=x*x;
return(y);
}
a) 1 , 4, 9, 16, 25 b)25 c) 36 d) 25, 9, 16
91. main ( )
{ }
int a;
fun1( ){ }
fun2( ){ }
To which of the above functions, int a is available to
a) available to neither of the function b) all functions
c) only fun1( ) d) both fun1( ) and fun2( )
92. The function sqrt of ----heder file
a) math.c b) iostream.h c) stadio.h d) conio.h
93. what is the range of char data value?
a)-128 to 127 b)-64 to 64 c) 0 to 255 d) -127 to 128
100. main( )
{
int a =0;
if (a) printf(“%d”,a+=2);
} the out put is
a) 3 b) 1 c) 2 d) 0
101. Int data type occupies------ no.of bytes.
a. 2bytes b. 4bytes c. 16bytes d. 32 bytes
102. Short int occupies---------- bits.
a. 8bits b.16bits c. 32bits d. 64bits
103. Evaluate 2%3*5+6/2* -----
a. 0 b.13 c. 3 d. 8
104. Out put of inta=10;printf(“%f”,a); is-----
a. 10 b.10.0 c. 0 d. error
105. Out of int a; a=5>6; if (a) printf(“you”)else printf(“me”);-----
a. you b. me c. youme d. error
106. Out put of int x=5, y; y=(x>5?3:4);-----------
a. 5 b. 3 c. 4 d. 0
107. Out put of int x=10; char y;------------
y=(x= =10? ‘A’ : ‘B’ );printf(“%d”,y);
a. 10 b. A c. B d. 65
108. Value of k is, float i=10.0,k; k=i%2------------
a. 0 b. 0.0 c. 1 d. error
109. I=I+1 is equal to -------
a. I++ b. ++I c. I+=1 d. all of above
110. Out put of : printf(“ %d”, size of (‘8’));
a. 8 b. 1 c. 2 d. 4
111. Loop Statements.
a. for b. while c. do…while d. all of above
112. C is
a. operating system b. package c. compiler d. dbms
113. & is a unary operator
a. true b. false

114. Format code %s is used for
a. int b. character c. string d. float
115. Range of int data type.
a. -32768 to 32767 fixed b. -128 to 127
c. Depending on the compiler d. infinite
116. char data type occupies____no. of bytes
a. 8 bits b. 18 bits c. 1 bit d. 32 bits
117. Standard keywords in ‘C’ is
a. 16 b. 32 c. 64 d.128
118. Pick out the valid variable
a. simple. Interest; b. simple interest
c. simple-interest d. simple_interest
119. In the following which is not a valid variable
a. stu.name; b. _stu_name;
c. stu_name; d. stu_name1;
120. What would be the output of the following
int i=32769; printf(“%d”,i);
a. 32767 b. 0 c.-32767 d. Error

No comments: