Ex - 1: What will be the result of the following program ?
main()
{
char c=' ',x,convert(z);
getc(c);
if((c>='a') && (c<='z'))
x=convert(c);
printf("%c",x);
}
convert(z)
{
return z-32;
}
Ans:
Compiler error
Explanation:
declaration of convert and format of getc() are wrong.
|