Write a C++ Program to Display Number (Entered by the User).
Solution:
/* C++ Program to Display Number (Entered by the User) */
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "Enter an integer :: ";
cin >> number;
cout << "
The Number entered is :: " << number<<"
";
return 0;
}
Output:
/* C++ Program to Display Number (Entered by the User) */
Enter an integer :: 8
The Number entered is :: 8
Process returned 0
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain why C++ is not purely Object Oriented Language
In C++ what is the meaning of data hiding?
What is the difference between creating an object, using 'new' and using 'malloc'?
How will you execute a stack using a priority queue? (Push and pop should be in O (1)).
In C++ what do you mean by Inheritance?
What is the purpose of a constructor? Destructor?
What are the advantages/disadvantages of using inline and const?
How will you print a list of all unique words from a string which may contain repeated words?
What is the difference between virtual functions and pure virtual functions?
What does it mean to take the address of a reference?
There is a base class sub, with a member function fnsub(). There are two classes super1 and super2 which are sub classes of the base class sub.if and pointer object is created of the class sub which points to any of the two classes super1 and super2, if fnsub() is called which one will be inoked?
Write a program to read two numbers from the keyboard and display the larger value on the screen