C Programming and Technical

output??
Q.
void main()
{i
nt i=5;
printf("%d",i++ + ++i);
}

A. Output Cannot be predicted exactly.

Explanation: Side effects are involved in the evaluation of i

Read Solution (Total 1)

C Other Question

output?
main()
{
static char names[5][20]={"pascal","ada","cobol","fortran","perl"};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i
output??
Q.
void main()
{i
nt i=5;
printf("%d",i+++++i);
}

A. Compiler Error

Explanation: The expression i+++++i is parsed as i ++ ++ + i which is an illegal combination of
operators.