What is the output of this C code?
void main()
{
int x = 4;
int *p = &x;
int *k = p++;
int r = p - k;
printf("%d", r);
}
Answer: C
No answer description available for this question.
Enter details here
What is the output of this C code?
int main()
{
int i = -5;
int k = i %4;
printf("%d\n", k);
}
Answer: B
No answer description available for this question.
Enter details here
What is the value of the below assignment expression
(x = foo())!= 1 considering foo() returns 2
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the following program?
#include < stdio>
int main()
{
int num = 0, z = 3;
if ( ! (num <= 0) || ++z )
printf( “%d %d ”, ++num + z++, ++z );
else
printf( “%d %d”, - -num + z- -, - - z);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
for c = 2, value of c after c <<= 1;
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the following program?
#include< stdio>
int main()
{
static unsigned int a = 23;
register unsigned char c = ‘R’;
auto long unsigned q = 345L;
static long signed p = 345L;
printf(“a = %u c = %c”, a ,c);
printf(“\nq = %ld p = %ld”, q, p);
return 0;
}
Answer: A
No answer description available for this question.
Enter details here
Relational operators cannot be used on:
Answer: A
No answer description available for this question.
Enter details here
Does logical operators in C language are evaluated with short circuit?
Answer: A
No answer description available for this question.
Enter details here
What is the output of this C code?
int main()
{
int a = 10, b = 10;
if (a = 5)
b--;
printf("%d, %d", a, b--);
}
Answer: C
No answer description available for this question.
Enter details here
Which of the following data type will throw an error on modulus operation(%)?
Answer: C
No answer description available for this question.
Enter details here