4. Why do we need long long int? Give anexample of a frequency array to count integer values. Can you makea frequency array that counts long long int type values? If theanswer is yes, tell how? If the answer is no, tell why?
5. Write a C program that takes a stringas input and tell if that string contains all digits from 0 to 9.The maximum length of string could be 1000. For example:
Input 1: Ab1DH5shb0djb4r1r5rgr1
Output 1: NO
Input2: 1hHfbG5D122Dj887D4HYy9520G63F14F6pLmmn578
Output 2: YES
6. Write a function named change_values()which will take an array of integers ar[], the size of the array N,and two more integer values L and R. You need to change all thevalues of the array between L-th index and R-th index to 0. Printthe array in the main() function. Here, (0 <= L,R < N and 0< N <=100000 and 0 <= ar <= N). For example:ar[]={10,20,30,40,50}, N=5, L=1, R=3 then the array will becomear[]={10,0,0,0,50} after the operation
7. Take an array name ar[] of size N wherethe values will be unique. Also take another integer value namedmul as input. Print “YES” if you can make mul by multiplying twodifferent values from that array. Otherwise, print “NO”. Here, (0< N <= 100 and 0 <= ar <= N and 0 <= mul <=10000). For example:
Input 1: 5
2 4 6 1 5
25
Output 1: NO
Input 2: 5
2 3 1 5 4
15
Output 2: YES
8. Take an integer N as input and make apattern for that number. Sample is given below...For example:
Input 1: 5
Output 1:
*
**
***
****
*****
****
***
**
*
Input 2: 7
Output 2:
*
**
***
****
*****
******
*******
******
*****
****
***
**
*
9. What is structure in C? Make an exampleto create a structure named Student with three integer values namedroll, class, marks and make a variable with it. Now make an arrayof that structure of size N which will take input from the user andcalculate the sum of marks of all students and print it
10. It’s time to say Goodbye. But not toprogramming right? So, print “Goodbye” 100 times. Isn’t that soeasy? No, you’re wrong. Print “Goodbye” 100 times, but if i-th(where i means 1 to 100) term is an odd number then print “I LoveProgramming!” For example:
I Love Programming!
Goodbye
I Love Programming!
Goodbye
This sequence will continue….