Top

Functions

31.

Functions cannot return more than one value at a time

Answer: A

True, A function cannot return more than one value at a time. because after returning a value the control is given back to calling function.

Enter details here

32.

What linkage does automatic variables have?

Answer: C

No answer description available for this question.

Enter details here

33.

What is the output of this C code?

void main()
    {
        int x = 3;
        {
            x = 4;
            printf("%d", x);
        }
    }

 

Answer: A

No answer description available for this question.
 

Enter details here

34.

What is the return-type of the function sqrt()

Answer: C

No answer description available for this question.

Enter details here

35.

What is the output of this C code?

void foo();
int main()
{
void foo(int);
foo(1);
return 0;
}
void foo(int i)
{
printf("2 ");
}

 

Answer: A

No answer description available for this question.

Enter details here

36.

What is the output of code given below?

enum m{JAN, FEB, MAR};
    enum m foo();
    int main()
    {
        enum m i = foo();
        printf("%d\n", i);
    }
    int  foo()
    {
        return JAN;
    }

 

Answer: A

No answer description available for this question.

Enter details here

37.

Which variable has the longest scope?

int b;
    int main()
    {
        int c;
        return 0;
    }
    int a;

 

Answer: B

No answer description available for this question.
 

Enter details here

Answer: D

No answer description available for this question.
 

Enter details here

Answer: D

No answer description available for this question.
 

Enter details here

40.

What is the output of this C code?

int *i;
    int main()
    {
        if (i == NULL)
            printf("true\n");
        return 0;
    }

 

Answer: A

No answer description available for this question.

Enter details here

Loading…
Tags: Functions Questions and Answers || Functions MCQ Questions and Answers || Functions GK Questions and Answers || Functions GK MCQ Questions || Functions Multiple Choice Questions and Answers || Functions GK || GK on Functions || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming