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 |
What is a class in C++?
1 Answers Amazon, TCS, UGC Corporation,
Identify the error in the following program. #include<iostream.h> void main() { int i = 0; i = i + 1; cout « i « " "; /*comment *//i = i + 1; cout << i; }
What is the difference between malloc, calloc and realloc?
What is a constructor initializer list?
How will you execute a stack using a priority queue? (Push and pop should be in O (1)).
Describe the different styles of function prototypes in C++.
How do you write a function that can reverse a linked-list in C++?
Write a program that ask for user input from 5 to 9 then calculate the average
Define type casting in C++.
What is the purpose of a constructor? Destructor?
Tell me about virtual function
Can we call C++ OOPS? and Why