role of assignment operator = in variable initialization and C++ shorthands.

Q4. Discuss the role of assignment operator = in variable initialization and C++ shorthands. Support your answer with examples. Ans.

Read more

Function of type conversion. Standard conversion rules of C++.

Q3. What is the function of type conversion? Write the standard conversion rules of C++. Ans. The process of converting

Read more

Types of expressions in C++.

Q2. What types of expressions can be formed in C++? Discuss each one of them with examples. Ans. The expressions

Read more

C++operators and their types.

Q1. Discuss all operators and their types (with examples) that you have learnt so far. Ans. Unary Operators Operators that

Read more

C++ program that reads in a character from the keyboard.

Q35. Write a C++ program that reads in a character <char> from the keyboard and then displays one of the

Read more

C++ program to print the largest of three.

Q33. Write a C++ program to input three integers and print the largest of three. Ans. #include<iostream.h>   //for standard input

Read more

If choice is 1, print the area of a circle otherwise print the perimeter of circle in C++.

Q32. Write a C++ program to input choice (1 or 2). If choice is 1, print the area of a

Read more

C++ program for printing Square Root if number is odd and positive otherwise print n5.

Q31. Write a C++ program to input a number. If the number n is odd and positive, print its square

Read more

C++ program for printing square if number is even otherwise print cube.

Q30. Write a C++ program to input a number. If the number is even, print its square otherwise print its

Read more