1) prepare a program in C to find out the sum of first n terms (n≥1) of the following series by using ‘ for’ loop. 1 - 3 + 5 - 7 + 9 - ...
2) prepare a program in C to convert the binary number to its corresponding octal number.
3) Given are two one dimensional arrays A and B stored in ascending order. prepare a program to merge them into single sorted array C which contains every element of A and B in ascending order.
4) Given an array of characters, prepare a C program to reverse an array.
5) prepare down a program in C to find out the length of a string.
6) prepare down a C program which reads a line of text and counts all occurrences of a particular word.
7) What do you mean by a macro? prepare a nested macro that gives the minimum of three values.
8) What is parameter passing? Describe call by value with suitable ex.
9) prepare down a C program fragment using “do...while” construct to print out even numbers between 10 to 100 making sure that three numbers are written per line.
10) prepare a recursive function in C to compute the value of xn where n is a positive integer and x has a real value.
11) describe the syntax for defining the composition of a structure. Describe the difference between declaring a structure and defining a structure variable.
12) prepare down a program in C which reads n elements of an integer array from a file and outputs the sum of all elements into the same file.