WAP which displays a given character, n number of times, using a function.
When the n value is not provided, it should print the given character 80 times.
When both the character and n value is not provided, it should print ‘*’ character 80 times.
[Write the above program in two ways:- -using function overloading. -using default arguments.
Algorithmic Problem
You are given the arrival and leaving times of n customers in a restaurant.
What was the maximum number of customers?
Input
The first input line has an integer n: the number of customers.
After this, there are n lines that describe the customers. Each line has two integers a and b: the arrival and leaving times of a customer.
You may assume that all arrival and leaving times are distinct.
Output
Print one integer: the maximum number of customers.
Example
Input:
3
5 8
2 4
3 9
Output:
2
Write a program to create a class to store details of a student ( name, roll and 3 subject marks ). Input details for 2 students and assign all the details of that student who is having higher average mark to a new student.
i) use member function
ii) use friend function
Write a program to create a class to store details of a student ( name, roll and 3 subject marks ). Input details for 2 students and assign all the details of that student who is having higher average mark to a new student.
i) use member function
ii) use friend function
For each of the following, write a single statement that performs the single task. Define two integer
variables val1 and val2. Initialize the val1 to 2300.
1. Define a pointer myPointer to an object of type integer.
2. Assign the address of variable val1 to pointer.
3. Print the value of the object pointed to by myPointer.
4. Assign the value of the object pointed to by myPointer to variable val2.
5. Print the value of val2.
6. Print the address of val1.
7. Print the address stored in myPointer