2. Write a C program to perform addition, subtraction, multiplication and division of two integer numbers, respectively 2 and 6 and show the result on the screen.
1. Write a C program to print your name, date of birth, mobile numbers and university’s name on separate line.
Using loop. Make a program code reverse
( from N to 1) (to 1 - N).
• Task 3: Write a function to calculate the (compound) interest on an initial investment of E100 at an annual interest rate of 5% by using a loop structure. Do not derive or use the compound interest formula.
The idea is to use a loop structure to add the compound interest to the present balance. You should assume that interest is paid annually and print the balance every year for 10 years. Modify your code so that the interest rate is entered from the command line. Make sure that your program issues an error if the interest rate is not a real number in the range 0≤r≤100.
TASKS
• Task 1: Install Microsoft Visual Studio C++ 2022 Community IDE on your laptop.
• Task 2: Write a program that stores the first N square integers (starting from 1) in a single array. You should allow the value N to be entered from the command line and use dynamic allocation to create the array.
Print the array to the screen at the end of your program. Modify your program so that the array can be extended by a number M also entered from the command line and then print it again. Sample output is shown below.
Enter N: 5 1 4 9 16 25
Enter M: 3 1 4 9 16 25 36 49 64
write a c++application that extracts a day,month and year and determines whether the date is valid. if the program is given a valid date,an appropriate message is displayed.
1 What do you mean by Program? Briefly describe the basic structure of C programs.
2 What is a token? Differentiate between a for loop and a while loop? What are it uses?
3 What is a data type? Differentiate between array and pointer. Write a program to interchange 2 variables without using the third one.
4 What is an array of pointers? Is it possible to have negative index in an array? Why is it necessary to give the size of an array in an array declaration?
5 Submit a Report "the impact of improving debugging skill on programming ability"
1 Write a C program to print your name, date of birth, mobile numbers and university’s name on separate line.
2 Write a C program to perform addition, subtraction, multiplication and division of two integer
numbers, respectively 2 and 6 and show the result on the screen.
3 Write a C program to input a number from user and print multiplication table of the given
number using for loop.
4 Write a C program to input number from user and check number is palindrome or not using
while loop.
5 Write a C Program to calculate the Average of an array elements where the elements are
received as input.
WAP to implement the following hierarchy using multiple inheritance
publisher author
book
Write the code to display a table consisting of four rows and six columns. The first column should contain the numbers 1 through 4 raised to the first power. The second column should contain the result of raising the number in the first column to the second power. The third column should contain the result of raising the number in the first column to the third power, and so on. Use two for statements: one to keep track of the numbers 1 through 4, and the other to keep track of the powers (1 through 6).