Top

Expressions

41.

What is the output of the following program?

#include < stdio>
int main()
{
int max =123, min = 10, *maxptr = &max, *minptr = &min;
int **nptr = &minptr, **mptr = &maxptr;
*maxptr = ++*mptr % **nptr;
max - = ( *minptr -**nptr && *maxptr || *minptr);
printf( “ %d %d”, ++**mptr, *minptr);
return 0;
}

 

Answer: A

No answer description available for this question.

Enter details here

42.

For which of the following, “PI++;” code will fail?

Answer: A

No answer description available for this question.

Enter details here

43.

What is the output of this C code?    

int main()
    {
        int y = 0;
        if (1 |(y = 1))
            printf("y is %d\n", y);
        else
            printf("%d\n", y);
 
    }

 

Answer: A

No answer description available for this question.

Enter details here

44.

What is the output of this C code?
 

int main()
    {
        int i = 7;
        i = i / 4;
        printf("%d\n", i);
       return 0;
    }

 

Answer: B

No answer description available for this question.

Enter details here

45.

What is the output of this C code?   

int main()
    {
        int i = 0;
        int x = i++, y = ++i;
        printf("%d % d\n", x, y);
        return 0;
    }

 

Answer: A

No answer description available for this question.

Enter details here

46.

What value will be stored in z if the following code is executed?

main()
{
int x = 5; y = -10, z;
int a = 4, b = 2;
z = x+++++y * b/a;
}

 

Answer: C

No answer description available for this question.

Enter details here

47.

What is the output of this C code?

void main()
    {
        int x = 1, y = 0, z = 5;
        int a = x && y && z++;
        printf("%d", z);
    }

 

Answer: B

No answer description available for this question.

Enter details here

48.

Which of the following statement are correct?

(i) The value stored in the CPU register can always be accessed faster than that stored in memory.
(ii) A register storage class variable will always be stored in a CPU register.

Answer: A

No answer description available for this question.

Enter details here

49.

What is the output of this C code?    

int main()
    {
        int y = 1;
        if (y & (y = 2))
            printf("true %d\n");
        else
            printf("false %d\n");
 
    }

 

Answer: C

No answer description available for this question.

Enter details here

50.

Comment on the output of this C code?    

int main()
    {
        int i = 2;
        int i = i++ + i;
        printf("%d\n", i);
    }

 

Answer: A

No answer description available for this question.

Enter details here

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