0% found this document useful (0 votes)
41 views

C Programming Assignment

This document contains 50 C programming assignment problems ranging from basic programs to calculate areas, swap numbers, check conditions to more complex programs involving loops, functions, patterns, strings, matrices and recursion. The problems cover a wide variety of core C programming concepts like data types, operators, decision making, looping, functions, arrays, strings, pointers and recursion.

Uploaded by

Shilpa Mourya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

C Programming Assignment

This document contains 50 C programming assignment problems ranging from basic programs to calculate areas, swap numbers, check conditions to more complex programs involving loops, functions, patterns, strings, matrices and recursion. The problems cover a wide variety of core C programming concepts like data types, operators, decision making, looping, functions, arrays, strings, pointers and recursion.

Uploaded by

Shilpa Mourya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

C Programming Assignment

1)WAP (Write A Program) to swap two numbers using a third variable.


2) WAP to swap two numbers without using a third variable.
3) WAP to find the area of the rectangle.
4) WAP to find the area of the circle.
5). write a C prog to calculate sum of digit of given no
6) temperature conversion Formulae f=c*9/5+32, c=(f-32) *5/9
7) write a prog to swap two numbers using bitwise operator.
8) C Program to find ASCII value of a Character.
9) write a prog to swap two numbers using bitwise operator.
10) C program to find the Size of int, float and char

11) WAP to check if a number entered is positive or negative or zero.


12) WAP to check if a number entered is even or odd
13) WAP to check if a character entered is a vowel or a consonant.
14) WAP to check if a character entered is uppercase or lowercase.
15) WAP to check if a character entered is an alphabet, number or a symbol.
16) WAP to check if a year is a leap year or not.

Contact: 8828222688
17) WAP to find the largest of the three numbers entered.
18) WAP to take input of marks of 5 subjects from the user and calculate
percentage and display the grade.
Percentage Grade
81% to 100% A
61% to 80% B
40% to 60% Pass
Less than 40% Fail
19) write a prog to accept 4 digits no from user and count zero, odd and even
digits of entered no.
20) write a C prog to check whether given no is Armstrong or not.
21) accept no check it is palindrome or not
22) write a C prog to check whether given no is perfect or not
23) write prog to accept character from user and check it is alphabet, digit or
punctuation symbol if it alphabets check it is lower case or upper case and then change
its case

24) C program to Display Factors of a Number


25) WAP to take input of two numbers and a number choice from the user and
display the respective arithmetic operation.
Number Choice Arithmetic Operation
1 Addition
2 Subtraction
3 Division
4 Multiplication
Explanation: After the user enters 2 numbers, the user should enter a choice. If
the choice entered is 1, then addition of the 2 numbers should be displayed. If the
choice entered is 2, then subtraction of the 2 numbers should be displayed. And
so on.

Contact: 8828222688
26) WAP to print numbers from 1 to 10 using
● Do while loop
● While loop
● For loop
27) WAP to print numbers from 50 to 40 using
● Do while loop
● While loop
● For loop
28) WAP to print numbers divisible by 11 between 10 and 100
● Do while loop
● While loop
● For loop
29) WAP to print multiplication table of an entered number
● Do while loop
● While loop
● For loop
30) WAP to print sum of numbers from 1 to 10 using
● Do while loop
● While loop
● For loop
31) WAP to print factorial of an entered number
● While loop
● For loop

Contact: 8828222688
32) WAP to reverse a number using a while loop.
33) WAP to print Fibonacci series using a for loop.
34)WAP to find if a number is prime number or not
35) write a C prog to generate following pattern for n lines
Aa
Aa Bb
Aa Bb Cc
Aa Bb Cc Dd
36) write a C prog to accept a string from user and generate following pattern
(e.g. input string is "abcd")
a
ab
abc
abcd
abc
ab
A
37) display pattern for n lines
1 2 3 4
5 6 7
8 9
10
38) Display Star Pattern (Pyramid Star Pattern)
39) write prog to generate following pattern for n lines 1 3 5 7 9 11

3 5

Contact: 8828222688
7 9 11

40) write prog to display multiplication table up to given no .

41) display each digit in words

42) Write a C prog to convert decimal no into binary, octal, hexadecimal write separate
user defined function for each option
43) write a C prog to display transpose of matrix using user defined function
44) write C prog o accept 2 strings an dcom[are them. if they are equal display their
length. ifstr1>str2 convert str1 to uppercase and str2 to lower case and display the
string and vice versa
45) C Program to Reverse the Contents and Print it.
46) Copy the content of one into another
47) Accept string from user & replace all occurrences of 'a' by '*' symbol
48) sum of elements of mxn matrix

49). write a prog to calculate factorial of given no using recursion

50) C program to Reverse a Number

Contact: 8828222688

You might also like