c programming 2018 Makeup

2nd Semester

Year 2018 Makeup

  1. Write a program to print transpose of a given matrix.

  1. Write a C program to read the file “hello.txt” and count the number of characters written in this file.

 

  1. Write a function to calculate the factorial value of the given number.

 

  1. Write a program to read n numbers from a user and sort those numbers in ascending order.





  1. Define a structure name “hotel”. It should have members that include the name, address, average room charge, and number of rooms. Read input of 10 hotels from user and write them to file named “hotel.dat”. Also display the name of hotels that have more than 5 rooms.

 



  1. Write a program to count the number of vowels in a given string.

9. Write a program to print the following pattern:
 
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
 

Leave a Reply

Your email address will not be published. Required fields are marked *