Observe the following code:
int nums[3] = {1, 2, 3};
std::cout << nums;
What will be output to the screen?
A: 1
B: 3
C: 123
D: A memory address
Write a program which requests a number between 1 and 50 from the user. It must repeatedly ask the user for a number until a valid number is entered. After receiving a valid number, the program must display all the even numbers smaller than that number.
Consider a scenario where a “Class A” network is divided into 3 subnets of fixed length. Design each subnet and find the IP Range and subnet mask of each subnet. (Choose any Class A address).
• isWaterFreezing. This function should return the bool value true if the temperature stored in the temperature field is at or below the freezing point of water. Otherwise, the function should return false.
• isWaterBoiling. This function should return the bool value true if the temperature stored in the temperature field is at or above the boiling point of water. Otherwise, the function should return false.
Write a program that demonstrates the class. The program should ask the user to enter a temperature and then display a list of the substances that will freeze at that temperature and those that will boil at that temperature. For example, if the temperature is −20 the class should report that water will freeze and for 100 water will boil.
class that stores a temperature in a temperature member variable and has the appropriate constructor, setter and getter functions. In addition to these, the class should have the following member functions:
• isEthylFreezing. This function should return the bool value true if the temperature stored in the temperature field is at or below the freezing point of ethyl alcohol. Otherwise, the function should return false.
• isEthylBoiling. This function should return the bool value true if the temperature stored in the temperature field is at or above the boiling point of ethyl alcohol. Otherwise, the function should return false. •
Design a class Account that has the following member: Data Fields: account_id(int type), balance(double type)). Member Functions-> withdraw(),deposit(),getmonthly_interest() and parameterize constructor to initialize data members. Use this class to print the balance. Use the withdraw () to withdraw money less than Rs 5000 and then deposit more than or equal 1500 using deposit function.
12. Create a class named 'Rectangle' with two data members 'length' and 'breadth' and two functions to print the area and perimeter of the rectangle respectively. Its constructor having parameters for length and breadth is used to initialize the length and breadth of the rectangle. Let class 'Square' inherit the 'Rectangle' class with its constructor having a parameter for its side (suppose s) calling the constructor of its parent class. Print the area and perimeter of a rectangle and a square. C#
Create a class with a function that prints "This is parent class" and its subclass with another function that prints "This is child class". Now, create an object for each class and call
1 - function of the parent class by the object of the parent class
2 - function of the child class by the object of the child class c#
3 - function of the parent class by the object of the child class
10. Write a program that would print the information (name, year of joining, salary, address) of three employees by creating a class named 'Employee'. The output should be as follows:
Name Year of joining Address
Robert 1994 64C- WallsStreat
Sam 2000 68D- WallsStreat
John 1999 26B- WallsStreat
C#
Write a program to print the volume of a box by creating a class named 'Volume' with an initialization list to initialize its length, breadth and height. (just to make you familiar with initialization lists) c#