-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpp Assingment.txt
31 lines (29 loc) · 2.31 KB
/
cpp Assingment.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Cpp Assignments:
1. Develop a Function to check if two numbers are equal without using arithmetic operators or comparison operators.
2. Write a program to display the following output using a single cout statement.
Subject Marks
Mathematics 90
Computer 77
Chemistry 69
3. Write a program to print all natural numbers upto N without using semi-colon.
4. Write a program which accept principle, rate and time from user and print the simple interest.
5.Write a program which accept temperature in Farenheit and print it in centigrade
6. Write a program that takes an input of string and displays the reverse of the string. It should be a function that takes a char* as arg and returns the char* with reversed value.
7.Write a program to check whether the given number is positive or negative (using ? : ternary operator )
8. Write a C++ program to find the sum and average of one dimensional integer array.
9. Write a menu driven C++ program with following option
a. Accept elements of an array
b. Display elements of an array
10. Develop a program to store employee objects into a file as CSV. It should be able to add, remove and update the values in the file.
11. Write a function to calculate the factorial value of any integer as an argument. Call this function from main( ) and print the results in main( ).
12.Write a function called zero_small() that has two integer arguments being passed by reference and sets the smaller of the two numbers to 0. Write the main program to access the function.
13.Write a C++ program, which initializes a string variable to the content "Time is a great teacher but unfortunately it kills all its pupils. Berlioz" and outputs the string to the disk file OUT.TXT. you have to include all the header files if required.
14.Write a function in C++ to count and display the number of lines not starting with alphabet 'A' present in a text file "STORY.TXT".
Example:
If the file "STORY.TXT" contains the following lines,
The rose is red.
A girl is playing there.
There is a playground.
An aeroplane is in the sky.
Numbers are not allowed in the password.
15.Create a program in Cpp to store Parking tickets for vehicles in a Shopping Mall Parking Lot. It should have features like raising ticket and finding vehicle based in Ticket no.