MENU
Question -

Find syntax error(s), if any, in the following program : (Assuming all desired header file(s) are already included)

typedef char String[80]; 
void main 
{
String S; int L; 
for(L=0;L<26;C++)
S [L]=L+65; 



Answer -

The given code has following errors:

  1. Parenthesis () are missing after void main.
  2. In for statement, the update expression should be L+ + but it is written as C + + .

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×