Week 0.1 - Extra Assignment
Week 0.1 - Extra Assignment
1. Read the word “Crossroads” from the user and Print the word “Crossroads” Less
Than 8 times without using any loop or goto statement.
4. Write a menu driven program to perform following Operations without using Library
functions.
1. STRING LENGTH
2. STRING CONCATENATION
3. STRING REVERSE
A. The program should not end until the user exits the program by giving an
input to the program to exit. The menu Should contain an option to exit.
B. The program should Contain 4 Functions Excluding main():
a. STRINGLENGTH()
b. STRINGCONCATENATION()
c. STRINGREVERSE()
d. EXIT()
5. Write a Program to copy one string to another without using String Functions?
6. Read some Malayalam Movie Names from User And Sort it?
7. Write a program to read the string “India is my country” from the user and find the
position of the word “is”?
9. Read a character from the user and find the ASCII code of that character?
A
ABA
ABCBA
ABCDCBA
11. Read some numbers from the user and find the repeating numbers?
Eg:
Input :2 9 4 6 9 4
Output :9 4
12. Read a line of text from the user , Find the number of Alphabets, Digits and
Special characters?
Eg,
13. Read random numbers from the user, find the maximum number in the list of
numbers?
a. Use at least one function
b. The function should return a value to main function
14. Read a random number (n) from the user and Generate nth Fibonacci
a. Must use Recursion
* *
** **
*** ***
**** ****
***** *****
****** ******
******* *******
******** ********
********* *********
********** **********
16. It's your first day at school. Your teacher asked the students to meet every
other student in the class and to introduce themselves. The teacher asked
them to do handshakes when they meet each other.
If there are n number of students in the class then find the total number of
handshakes made by the students.
Program to find the maximum number of handshakes is discussed here.
Given a positive integer n, find out the total number of handshakes
possible.
Eg,
Input : 15 // Total Number of students
Output :105 //Maximum Number of Handshakes
17. Read two numbers from the user and swap those two numbers using
Pointer.
If the weight of the parcel is less than 500gm or equal to 500gm then the
parcel charge will be Rs. 200, Otherwise there is an additional charge of
Rs.170 per each extra 500gm