CS3271 Set2
CS3271 Set2
(Regulations 2021)
2. Write a C program to swap values of two variables with and without using third variable.
**
***
****
*****
5 If a four-digit number is input through the keyboard, write a program to obtain the sum of the first
and last digit of this number.
9. Write a C program to accept a string and count the number of vowels present in this string.
Page 1 of 2
10 Write a C program in C to copy one string to another string
12 Write a C program to read an integer number and print the reverse of that number using recursion.
13 Write a C program to swap two integers using call by value and call by reference methods of
passing arguments to a function.
14 Write a C program to check whether a number is prime, Armstrong or perfect number using
functions.
18 Write a C program to create a structure named company which has name, address, phone and no of
Employee as member variables. Read name of company, its address, phone and no of Employee.
Finally display these members‟ value.
Page 2 of 2