1.

Rewrite the following program after removing the syntactical errors (if any). Underline each correction.

Answer»

#include<iostream.h>

#include<conio.h>

typdef int Num;     //Typedef should be written as typedef

Num full=100;

Num Calc(int X)

{

full=(X>2)?1:2;

return (full%2);   //; is missing

}

void main()

{

int full=1000;

full=Calc(::full);

cout<<::full<<”::”<<full<<endl;

}



Discussion

No Comment Found

Related InterviewSolutions