C Language - Storage Classes

You Are Here :: Home > C Language > Storage Classes- General Questions

 
37.

extern int s;

int t;
static int u;
main ( )
{ }
which of s, t and u are available to a function present in another file ?

A. only s B. s & u
C. s, t, u D. None




38.

What will be output of following program?

#include
#include
int main(){
int register a;
scanf("%d",&a);
printf("%d",a);
return 0;
}
//if a=25

A. 25 B. Address
C. 0 D. Compilation error




39.

What will be output of following program?

main()
{
extern int i;
i=20;
printf("%d",sizeof(i));
}

A. 0 B. 2
C. 20 D. Linker error




40.

What is the output of following?

main( )
{
extern int fun(float);
int a;
a=fun(3.14);
printf("%d",a);
}
int fun(aa)
float aa;
{
return((int)aa);
}

A. 3.14 B. 3.0
C. Error D. 0




41.

What will be the value of i and j in the following code ?

main( )
{
auto int i,j=6;
printf("%d%d",i,j);
}

A. 0 6 B. Garbage values
C. Error D. Garbage value 6




42.

What different values of " i " following code prints ?

int i;
main( )
{
printf("%d",i);
increment( );
decrement( );
}
increment( )
{
i++;
printf("%d",i);
}
decrement( )
{
i--;
printf("%d",i);
}

A. 1 1 1 B. 0 0 0
C. 0 1 0 D. None of the above




« previous

1

2

3

4

5

6

7

8

9

...

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on