Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Operators,data types.
Write a C Program to display "Hello World" on screen.
Write a C Program to display your name and address in different lines.
(1)Write a C program to calculate sum of two integers numbers and print it.
(2)Write a C Program to display square and cube of a number.
(3)Write a C Program to find area of circle.
(4)Write a C Program to interchange values of two number using third variable.
(5)Write a C Program to interchange values of two number without using third var
iable.
(6)Write a C Program to convert Km value into meter value.
(8)Write a C Program to input all marks of all the subjects and display total an
d percentage.
(9)Write a C Program to input quantity and price of an item and display total Rs
. on screen. Also input discount (%) and display final payment R
s. on screen.
(10)Write a C Program to input total selling of salesman and calculate 25% c
ommission on selling and display it.
(13) Write a C Program to accept any character from user and display its ASCII n
umber on screen.4
(14) Write a C Program to input any ASCII number and display appropriate charact
er on screen.
(15) Write a C Program to find area of a rectangle ( Hint : A = l*b)
(16) Write a C Program to find area of a triangle (Hint : A = ½ *h*b)
(19) Write a C Program to input three digits number from user and calculate sum
of first and last numbers.
(Hint : I/p :358 O/p :11)
(21) Write a C Program to convert Celsius value into Fahrenheitvalue. ( Formula
: F= C X 9/5 +32)
(22) Write a C Program to convert Fahrenheit value into Celsius value.( Formula
: C= (F-32) X 5/9)
(24) Write a C Program to input two digits number from user and display reverse
of that number on screen
(Hint : I/P : 32 O/P : 23)
control statements
(1)Print first N numbers
(2)sum of first N numbers
(3)print first N even or odd numbers
(4)print even or odd numbers within a given range
(5)factorial of a number
(6)fabonacci series
(7)gcd & lcm of two numbers
(8)prime or not
(9)generate first N prime numbers.
(10)reverse a given number.
(11)add all the digits of a given number(ex:12345 sum=15).
(12)To find whether given number is power of 2 or not.
(13)wAP to count the number of ones in a given integer
example:
(14)To convert 2 digit number to word. e.g.i/p : 45o/p :forty five.
(15)Write a C program to print all Armstrong numbers between 1 to1000. (e
x: 135= 1^3 + 3^3 + 5^3).
(16)Write a C program to print all Combinations of characters A, B, C.
(17)Write a C program to find the factors of a given number.
(18)Write a C program to find the prime factors of a given number.
(19)Convert decimail nos to roman equivalent upto 2000 and vice-versa
(20)write a program to add even digits of a given number
example : 13462 output: 4+6+2=12
ARRAYS
1.wap to read and print N numbers.
2.TO calculate average of N numbers.
3.To count the no of Even and Odd numbers.
4.To print larger and smaller elements of an array
5.To count the occurance of the given number.
6.Ascending/Descending order
7.To find binary equivalent of the number and also of bits in it.
eg: Num = 8 binary : 1000 number of bits=4;
8.Write a C program to delete an element from the 'n' position of an array.
9.Write a C program to Insert an element at the 'n' th position
10.Write a C program read a sequence of positive integers and store it in an arr
ay, then read an integer N, and then rotate clockwise the content of the arr
ay a corresponding number of positions and print resultant array.
For example, if the sequence was 1,2,3,4,5
and the number 3 is entered, the array becomes 3,4,5,1,2
STRINGS
1.WAP to read and print your name using gets() and puts() functions.
2.Implement all the string instructions
a>strlen
b>strcpy , strncpy
c>strcmp , strncmp
d>strcat , strncat
3.check whether a given string is palindrome or not
4.count the number of vowels in a given string
5.WAP to read a string and print the count of all the characters.
example : good morning
output : g=2 o=3 d=1 m=1 r=1 n=2 i=1.
6.WAP to check whether a given sub string is present in the main string.
7.write a program that accepts name and prints its short form.
example : amal krishna roy
output : a k roy
8.WAP to read a string and print all the words in reverse order
example: good morning india
output : india morning good