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 |
Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.
Mention the default functions in C++, how would you detect that error has occurred inside the constructor and destructor.
What are the advantages/disadvantages of using inline and const?
Write a program that can take input from 3 to 8 and calculate the average?
How can you force the compiler to not generate them?
What is a virtual function in C++?
How many times will this loop execute? Explain your answer.
How do you write a function that can reverse a linked-list in C++?
Explain function prototypes in C++.
When would you use a pointer? A reference?
What Is Polymorphism in C++ ?
2 Answers IBS, Impetus, ITC Indian Tobacco Company, Motorola,
what is a pragma in C++?