C Programming and Technical

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

Read Solution (Total 0)

C Other Question

output??
main()
{
char *p;
p="Hello";
printf("%cn",*&*p);
}

A. H

Explanation: * is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H.
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