Computer Programming in C
Computer Programming in C
Write an algorithm and draw a flowchart for a program to print sum and average of ‘n’
B)
natural numbers.
A) Write a program to find the maximum number from 3 numbers enter by user.
B) Explain any three types of operators along with it’s precedence and associativity.
C) Write a program to create simple calculator to perform addition, subtraction, division, and
multiplication operations.
B) Write a program to print factorial of a given number using while and also, write the
program using do….while loop.
B) Write a program to perform the following operations on the string (With and without using
library function):
1. find length of string 2. copy 3. concatenation 4. reverse.
C) Write syntax of following Concepts of C:
1. Array 2. Switch 3. Function
A) Write a program in C to create a structure of student with fields such as Student Name,
Roll Number and Marks of two subjects as its members. Calculate average of two subjects.
Read the details of ‘n’ students from user and then display the data in this format.
Roll No. Name Sub1 Sub2 Total Average
B) Write a program in C to create a structure having named as Books consists of title, author,
subject, book_id as its members. Read the details of five books from user and then display
the data entered by the user on Screen (Use array of structure).
C) Define structure with suitable example. What is difference between structure and Union?