Explain structure and nested structure in C programming. Suppose a program stores employee data using a structure. Each employee has name, address, ID, and salary. Write a C program to store details of multiple employees and display the record of employees earning above average salary using a user-defined function.
Explain the relationship between arrays and pointers. Write a program to find the maximum element in an array using pointer and display the result in main() function.
What is the difference between actual parameter and formal parameter? Differentiate between call by value and call by reference. Write a C program to reverse a given integer.
Attempt any Eight questions
[8×5=40]List different types of operators in C and explain any three with programming example.
Write a program to read a 3×3 matrix of integers and display the smallest element of each column.
Write a program using recursion to find the sum of first n natural numbers where even numbers are added as their square and odd numbers are added as themselves.
Trace the output of the following program:
#include <stdio.h>
void main()
{
int a, b, c = 1, sum = 0;
for (a = 1; a <= 3; a++) {
for (b = a; b >= 1; b--) {
sum = sum + (a * b);
if (sum % 3 == 0) c = c * a;
else c = c + b;
}
printf("%d ", c);
}
} Why do pointers improve program modularity? Write a C program to demonstrate pointer arithmetic by accessing array elements using a pointer.
Write a program to read 10 integers into an array and arrange them in descending order.
Write a program to count frequency of each character in a given string.
List any two file opening modes. Write a program to read a file that contains only integers separated by comma and count the number of even elements in that file.
Describe the functions used to initialize graphics mode. Write a C program using graphics functions to draw a rectangle and a circle on the screen.


