Beruflich Dokumente
Kultur Dokumente
HOLIDAY HOMEWORK
COMPUTER SCIENCE
YEAR – 2018– 2019
firmware?
int main( )
{ cout<<”Enter Variable”;
cin>>var
sqrs=var*var
cout<<”The square is”<<sqrs;
8. Write a program to enter a single character and display the
gender. If the input is ‘M’ display “Male “ and if the input is ‘F ‘,
display “Female “.(Use IF-ELSE statement)
10. Write a C++ program to find the grade of a student for a given
score?(Eg if score above 90 then specify as Grade ‘A’ and so on…..)
11. Who was the developer of C++? what was the original name
given to C++?
12. What are tokens in C++? How many types of tokens are
allowed in C++? Name them.
13. How are keywords different from identifiers?
14. What are operators? What is their function?
15. What are variables? How are they important for a program?
16. What all components can a C++ program contain?
17. Enumerate the rules for naming an identifier?
18. What is a comment line? How do you write a comment that
extends beyond a single line?
19. Explain the role of a compiler in a programming language.
What type of errors does it report?
20. Explain the role of the file iostream.h in C++.
21. What are streams in C++? which streams are predefined on
C++?
22. Why is main() function so important in C++?
23. Write any 15 programs in C++ which includes IF statement, For
statement, SWITCH statement etc.