Buddhanagar, Kathmandu
Second Mid Term Exam - 2077
SET - A
- Answer the following questions.[5*1=5]
- Write down the syntax and function of printf().
- Differentiate between output and append mode.
- Why C is called structured programming language?
- List all the relational operator of C language.
- Write the syntax of FOR Loop.
- Write a program in QBASIC that asks length, breadth and height of a rectangular room. Create a user defined function to calculate area and sub program to calculate volume of the room. [4]
- Write a program in QBASIC that asks a two numbers. Create a user defined function to calculate HCF and sub program to calculate LCM of those two numbers. [4]
- A sequential data file named “rec.dat” has several stored records under the filed heading roll no, name, gender, English, Nepali, Maths and Computer. Write a QBASIC program to display all the information of that student whose gender is ‘F’ and obtained marks in computer is more than 90. [4]
- Write a C program that checks whether the supplied number is even or odd. [4]
- Write a C program that displays the series: 7 22 11 34 ... upto nth terms.[4]
The End
Buddhanagar, Kathmandu
Second Mid Term Exam - 2077
SET - B
- Answer the following questions. [5*1=5]
- Write down the syntax and function of scanf().
- Differentiate between sub and function procedure.
- Why C is called middle level language?
- List all the arithmetic operator of C language.
- Write the syntax of if-else statement.
- Write a program in QBASIC that asks radius of a circle. Create a user defined function to calculate area and sub program to calculate circumference of the circle.[4]
- Write a program in QBASIC that asks a multi-digit number. Create a user defined function to calculate the reverse of that given number and sub program to test whether that supplied number is palindrome or not. [4]
- A sequential data file named “empinfo.dat” has several stored records under the filed heading emp no, name, department, post and salary. Write a QBASIC program to display all the information of those employee whose post is “Manager” and salary is more than 50,000. [4]
- Write a C program that checks whether the supplied number is positive or negative. [4]
- Write a C program that displays the series: 1 4 9 16 ... upto nth terms. [4]
The End