0% found this document useful (0 votes)
11 views1 page

C Programming Assignment on Control Structures

The document outlines a series of programming assignments in C, categorized into four sections: Conditional Statements, Loops, Arrays, and Functions. Each section contains specific tasks such as checking divisibility, calculating percentages, finding maximum values, and using functions for various calculations. The assignments are designed to enhance programming skills through practical coding exercises.

Uploaded by

pleasestudykrits
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

C Programming Assignment on Control Structures

The document outlines a series of programming assignments in C, categorized into four sections: Conditional Statements, Loops, Arrays, and Functions. Each section contains specific tasks such as checking divisibility, calculating percentages, finding maximum values, and using functions for various calculations. The assignments are designed to enhance programming skills through practical coding exercises.

Uploaded by

pleasestudykrits
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Assignment 1

Conditional Statements
 1. Write a C program using if-else to check whether a given number is divisible by both
3 and 5, only 3, only 5, or neither.
 2. Write a C program to take marks of five subjects and calculate the percentage, then
display the grade using conditional statements.
 3. Write a C program to find the largest among three numbers using nested if-else.
 4. Write a C program that checks whether a given character is an uppercase letter,
lowercase letter, digit, or special symbol.
 5. Write a C program to input the day number of a week (1–7) and print the
corresponding weekday name using if-else ladder.

Loops
 1. Write a C program using a for loop to print all even numbers and calculate their sum
up to a given limit.
 2. Write a C program using a while loop to find the reverse of a number.
 3. Write a C program using a do-while loop to calculate the factorial of a number.
 4. Write a C program to display the multiplication table of a given number using a for
loop.
 5. Write a C program to calculate and print the sum of all digits of a given number using
while loop.

Arrays
 1. Write a C program to find the maximum and minimum elements in an array.
 2. Write a C program to calculate the average of all elements in an array.
 3. Write a C program to find the position of a given element in an array (linear search).
 4. Write a C program to copy all elements of one array into another array using a loop.
 5. Write a C program to print the elements of an array in reverse order.

Functions
 1. Write a C program using a function to calculate the square of a number.
 2. Write a C program using a function to check whether a given number is even or odd.
 3. Write a C program to find the factorial of a number using a user-defined function.
 4. Write a C program to calculate the sum of digits of a number using a function.
 5. Write a C program using a function to find the greatest of two numbers.

You might also like