XI C++ HOME ASSIGNMENT--SOLUTION (TEST C++ SKILLS)
CRACK TOUGH NUTS IN C++ Test your skills in C++ PART-1 “Useful for XI Computer Science Students to test their understanding lavel in C++ “ QUESTIONS WITH SOLUTION 1.Smallest Program in C++ : main(){} 2.Identify the erroes if any: main(){ return 5;} // 0 error….Because “By default main() function returns an integer”. int main(){ return 5; } //no error int main(){ return; // return <integral expression> Here function must return an integral value; }//or write void instead of int as return type of main() function. void main(){ return;} // no error char main(){ char c=65; return c; } //error- main must return an int or void no other data type int main(){ char c=65; return c; }// No error..because c has its ASCII Code as its value and that is an integer int main(){ return int(5.8999); }//0 error 0 warning int main(){ return 5.8999; } // [warning] converting to “int” from “double”—loss of data due to truncation of fractional part int main(){ return 5.8; }// [war...