C Programming and Technical

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

Read Solution (Total 0)

C Other Question

output?
main()
{i
nt i=1;
while (i2)
goto here;
i++;
}} fun()
{
here:
printf("PP");
}

A. Compiler error: Undefined label 'here' in function main

Explanation: Labels have functions scope, in other words the scope of the labels is limited to functions. The label 'here' is available in function fun() Hence it is not visible in function main
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