bsc final year c/c++ programming assignment 2016-17 · bsc final year c/c++ programming assignment...

11
BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 1 ASSIGNMENT 1 1. Write a C program to perform arithmetic operation. 2. Write a C program to swap two number using temporary variable and without using temporary variable. 3. Write a C program to find area of rectangle and triangle. 4. Write a C program to calculate the Gross salary and Net salary using this information: a. HRA=20% b. DA=15% c. PF=5% d. Incentive=2% ASSIGNMENT 2 5. Write a C program to find largest number from the given three numbers. 6. Write a C program to find that given number is EVEN or ODD. 7. Write a C program to perform arithmetic operations using functions. 8. Write a C program to perform bitwise operator and evaluate : a. Bitwise AND b. Bitwise OR c. Bitwise XOR 9. Write a C program to display day by selecting the number from 1 to 7 using SWITCH case. ASSIGNMENT 3 10. Write a C program to print table of any given number using FOR loop. 11. Write a C program to print the pattern give below: a. * ** *** **** ***** b. * ** *** **** ***** 12. Write C program to store 10 elements in Array and reverse those elements in another array. 13. Write C program to calculate SUM of Array. 14. Write C program to Add Matrix’s. ASSIGNMENT 4 15. Write C++ program to show the use of Class & Object. 16. Write C++ program to show the use of Operating Overloading. 17. Write C++ program to show the use of Function Overloading. 18. Write C++ program to show the Inheritance. 19. Write C++ program to show the use of Recursion. 20. Write C++ program to show a list of data using BUBBLE SORT.

Upload: others

Post on 13-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 1

ASSIGNMENT 1

1. Write a C program to perform arithmetic operation.

2. Write a C program to swap two number using temporary variable and without using

temporary variable.

3. Write a C program to find area of rectangle and triangle.

4. Write a C program to calculate the Gross salary and Net salary using this information:

a. HRA=20%

b. DA=15%

c. PF=5%

d. Incentive=2%

ASSIGNMENT 2

5. Write a C program to find largest number from the given three numbers.

6. Write a C program to find that given number is EVEN or ODD.

7. Write a C program to perform arithmetic operations using functions.

8. Write a C program to perform bitwise operator and evaluate :

a. Bitwise AND

b. Bitwise OR

c. Bitwise XOR

9. Write a C program to display day by selecting the number from 1 to 7 using SWITCH

case.

ASSIGNMENT 3

10. Write a C program to print table of any given number using FOR loop.

11. Write a C program to print the pattern give below:

a. *

**

***

****

*****

b. *

**

***

****

*****

12. Write C program to store 10 elements in Array and reverse those elements in another

array.

13. Write C program to calculate SUM of Array.

14. Write C program to Add Matrix’s.

ASSIGNMENT 4

15. Write C++ program to show the use of Class & Object.

16. Write C++ program to show the use of Operating Overloading.

17. Write C++ program to show the use of Function Overloading.

18. Write C++ program to show the Inheritance.

19. Write C++ program to show the use of Recursion.

20. Write C++ program to show a list of data using BUBBLE SORT.

Page 2: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 2

1. Write a C program to perform arithmetic operation.

Source code: Output:

2. Write a C program to swap two number using temporary variable and without using

temporary variable.

Source code: Output:

3. Write a C program to find area of rectangle and triangle.

Source Code: Output:

Page 3: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 3

4. Write a C program to calculate the Gross salary and Net salary using this

information:

a. HRA=20%

b. DA=15%

c. PF=5%

d. Incentive=2%

Source Code: Output:

5. Write a C program to find largest number from the given three numbers.

Source Code: Output:

Page 4: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 4

6. Write a C program to find that given number is EVEN or ODD.

Source Code:

Output:

7. Write a C program to program to perform arithmetic operations using functions.

Source Code: Output:

Page 5: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 5

8. Write a C program to perform bitwise operator and evaluate:

a. Bitwise AND b. Bitwise OR c. Bitwise XOR

Output:

1. 2. 3. 4.

9. Write a C program to display day by selecting the number from 1 to 7 using

SWITCH case.

Source Code: Output:

Page 6: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 6

10. Write a C program to print table of any given number using FOR loop.

Source Code: Output:

11. Write a C program to print the pattern give below:

a. *

**

***

****

*****

b. *

**

***

****

*****

a. Source Code:

a. Output:

b. Source Code:

b. Output:

Page 7: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 7

12. Write C program to store 10 elements in Array and reverse those elements in

another array.

Source Code: Output:

13. Write C program to calculate SUM of Array.

Source Code: Output:

Page 8: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 8

14. Write A C Program To Add Matrix’s.

Source Code: Output:

15. Write C++ program to show the use of Class & Object.

Source Code: Output:

Page 9: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 9

16. Write C++ program to show the use of Operating Overloading.

Source Code: Output:

17. Write C++ program to show the use of Function Overloading.

Source Code: Output:

Page 10: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 10

18. Write C++ program to show the Inheritance.

Source Code: Output:

19. Write C++ program to show the use of Recursion.

Source Code: Output:

Page 11: BSc Final Year C/C++ Programming Assignment 2016-17 · BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur | BSc Final year C/C++ Programming Assignment By RAMSWAROOP

BSc Final Year C/C++ Programming Assignment 2016-17|ACE Jodhpur |

BSc Final year C/C++ Programming Assignment By RAMSWAROOP BHATI Page 11

20. Write C++ program to show a list of data using BUBBLE SORT.

Source Code: Output:

Please Recompile All Programs and Test Yourself to Sure Accuracy. Thank You… RS