You are on page 1of 1

Programming Fundamentals

Assignment No 2

------------------------------------------------------------------------------------------------------------------------------------
CLO 3

Q.1Write a program to print the index no of the largest element of an array of size 10. If
there are more than two then print the largest index.
For example, in arr[10] = {2,4,6,12,8,34,1,3,34,5}, the largest no is 34 and it appears two
time, it should print index no 8.
Program should prompt the user to enter 10 integers.

Q2. Write a C++ program to make a small game “Rolling a Dice”. Dice has six face values i.e
1, 2,3,4,5, and 6. Your program should roll the dice 1000 times and at the end it should
display the Number of occurrences of each face value saved in an array of size 6.

Q3. Write a program to print the Multiplication of the 2 X 2 Matrices.

Q4. Write a program that prompts the user to enter two C string and displays the longest
one.

Q5. Ask user to enter full name. Save the full in C string and copy the fisrt name in another
Cstring.

You might also like