C Programming and Technical HR Interview Interview

main()
{
static int var = 5;
printf("%d ",var--);
if(var)
main();
}
find output

Read Solution (Total 7)

C Other Question

Predict the output or error(s) for the following programmes:
void main()
{i
nt const * p=5;
printf("%d",++(*p));
}
Answer: Compiler error: Cannot modify a constant value.
Explanation: p is a pointer to a "constant integer". But we tried to change the value of the
"constant integer".
38. main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
main()
{i
nt c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j