C - Storage Classes of Variables
C - Storage Classes of Variables
31. What does extern means in a function declaration ?
- The function has global scope.
- The function need not be defined
- Nothing really
- The function has local scope only to the file it is defined in.
32. extern int s;
int t;
static int u;
main ( )
{ }
which of s, t and u are available to a function present in another file ?
int t;
static int u;
main ( )
{ }
which of s, t and u are available to a function present in another file ?
- only s
- s & u
- s, t, u
- none
33. What will be the output of the following code ?
static int i = ;
main ( )
{
int sum=;
do
{
sum+=(/i);
}while (<i - - );
printf ("sum of the series is %d", sum );
}
static int i = ;
main ( )
{
int sum=;
do
{
sum+=(/i);
}while (<i - - );
printf ("sum of the series is %d", sum );
}
- It will print the sum of the series 1/5+1/4+.....+1/1.
- It will produce a compilation error
- It will produce a runtime error.
- None of the above.