Professional Documents
Culture Documents
else I hate u
4. Dennis O.
return Trial (y,x,z); Richard
I love u I
hate u
}
} 2. An array, }
{ printf ("%d\n",i);
printf("%c",c); } main( )
} {
};
Array 22......
static char **ptr[ ] = {s+3, The valid variable is
s+2, s+1, s};
Enumeration name
char ***p = ptr;
}
Compiler Error
18.......
20.......
int main (void)
main( )
{ 23........
{
int i=1; main()
Printf("%d",(10>12)?10:12);
{ __________ ; // call to f( )
i++;
} 25....... i = f(i,s)
} main ( )
fun() { f(i,*s)
{ int i ;
} printf("%d\n", i + 5);
} 27........
int i = 2;
x is not five
printf("%d %d", a[i], i[a]); 7
}
value of x is 5
02
31.....
x is five value of x is 5
20 main( )
{
30......
40 float num;
int incr (int i)
num = 20.1248;
{
44 printf("%d", num);
static int count = 0;
}
count = count + i;
Compiler Error
return (count);
29.......
}
int main (void) 20
main ( )
{
{
int x=9; 0
int i, j;
if (x=5)
for (i = 0; i <=4; i++)
printf ("x is five\t"); Runtime Error
j = incr(i);
declared with the char *p = (char *)(malloc*)
------------------------storage (100);
class specifier.
32....... auto
35.........
void main( )
int call (int n);
{ static
int main (void)
while(1)
{
{ if(printf("%d", printf("%d"))) register
printf ("%d", call (2));
break;
printf ("%d" , call (5));
else extern
printf ("%d" , call (2));
continue;
return 0;
}
}
} 34....
int call (int n)
What is the output: can you combine the
following two statements {
Garbage value
into one? static int s=0;
int i;
Compiler error
char *p; for (i=1; i<=n; i++)
p = (char*) malloc(100); s+=i;
Runtime Error
return s;
char p = *malloc(100); }
None of these
3 8 22
char *p = (char) malloc(100);
3 8 21
33.......
char *p =
For a local variable in a (char*)malloc(100);
function to retain its value 3 7 21
between calls to the
function, it must be
2 3 21 d++; Compiler Error
36...... } main( )
break 44.....
goto goto What does the following
continue code print
return continue
Printf("*\b**\b***\b****\b"
);
41.... return
**********
int i;
char p [20];
*******
char * s = "string"; 43.....
} main( )
none
z = 4, y = 1, x = 0 {
z = 4, y = 4, x = 0 char *p;
z = 4, y = 4, x = 1 printf("%d%d",
47...... sizeof(*p),sizeof(p));
z = 4, y = 1, x = 1
union values }
{ 12
char w;
46......
float x; 21
What is the output of
following code double y;
};
int main ( ) 23
{ union values v;
Infinite loop e = 0, f = 6 {
float array[5]={1,2,3,4,5};
0 printf("%d", sizeof(array));
51..... }
printf("e=%d, f=%d\n",e,f);
int main ( )
hello
return 0;
{
}
float array[5]={1,2,3,4,5};
olleh
e=0 f=8
printf("%d", sizeof(array));
}
e=10 f=10
52..... 5
25