Basic C++ programming question
C++ language is the super-set of C language. C++ is the Object Oriented Programming ( OOP) in which source-code is created under the class. It is developed by Bjarne Stroustrup in Bell Laboratories in 1983. C++ is further rectified in 1998 by ISO committee. C++ is the extensible language, it is developed for the large-scale software development. In C++ all the feature of C is implemented.
In the programming world, every language has their rule and regulation to write a program. In the C++ language, all the statements having variables, constants, keywords, blank-space, special characters, and operators is called as the C++ token. Without these tokens the C++ program is incomplete.
The structure of C++ defines how to create a simple C++ program. There are many sections which are defined in the structure, some are mandatory and some are optional but the use of all the section properly make the program readable for the readers.
Some of most important C++ programming questions are given below:
1. Write a C++ program to print "HELLO WORLD".
2. Write a C++ program which accepts two numbers and print their sum.
3. Write a C++ program which accepts temperature in Fahrenheit and print it in centigrade.
4. Write a C++ program which accepts principle, rate and time from the user and print the simple interest.
5. Write a C++ program which accepts a character and display its ASCII value.
6. Write a C++ program to swap the values of two variables.
7. Write a C++ program to calculate the area of the circle.
8. Write a C++ program to check whether the given number is positive or negative.
9. Write a C++ program to check whether the given number is even or odd.
10. Write a C++ program to swap value of two variables without using the third variable.
11. Write a C++ program which inputs three numbers and display the largest number using ternary operator.
12. Write a C++ program which accepts a character and display its next character.
13. Write a C++ program which accepts days as integer and display the total number of years, months and days in it.
Thanks
Mukesh Rajput
Post A Comment:
0 comments: