0% found this document useful (0 votes)
44 views2 pages

Programming Fundaments Terminal - Online

This document provides instructions and questions for a programming fundamentals terminal examination. It includes 5 multiple choice questions worth 15 marks total. Question 2 asks students to draw a flowchart to determine and print the name of the youngest of three people based on ages input from the keyboard. Question 3 asks students to write a program to print the multiplication table of a number entered by the user. Question 4 asks students to write a program to calculate overtime pay for 10 employees based on hours worked. Question 5 asks students to write a program to calculate an employee's gross salary based on their basic salary and different rates for HRA, DA, and CA depending on if their basic salary is less than or greater than or equal to Rs. 1500.

Uploaded by

cevevo4672
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

Programming Fundaments Terminal - Online

This document provides instructions and questions for a programming fundamentals terminal examination. It includes 5 multiple choice questions worth 15 marks total. Question 2 asks students to draw a flowchart to determine and print the name of the youngest of three people based on ages input from the keyboard. Question 3 asks students to write a program to print the multiplication table of a number entered by the user. Question 4 asks students to write a program to calculate overtime pay for 10 employees based on hours worked. Question 5 asks students to write a program to calculate an employee's gross salary based on their basic salary and different rates for HRA, DA, and CA depending on if their basic salary is less than or greater than or equal to Rs. 1500.

Uploaded by

cevevo4672
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming Fundamentals– BSCS - Terminal Examination – Fall 2019

Marks = 50

Please add your name, class and roll no on answer book before submitting online. You can submit
the solution of this paper through email using : [email protected] or on my Whatsapp no. Do
not share solution on Whatapp group. Good luck and stay safe!

(1) What would be the output of the following program segments: (5 marks each: 15)

(a) main( ) {
printf ( "\nOnly stupids use C?" ) ;
display( ) ;
printf ( "\n No genius use C?" ) ;

}
display( )
{
printf ( "\nFools too use C!" ) ;
main( ) ;
}

(b) main( )
{
int i = 45, c ;
c = check ( i ) ;
printf ( "\n%d", c ) ;
}
check ( int ch )
{
if ( ch >= 45 )
return ( 100 ) ;
else
return ( 10 * 10 ) ;
}

(c) main( ) {
int x = 4, y = 0, z ;
while ( x >= 0 )
{
if ( x == y )
break ;
else
printf ( “\n%d %d”, x, y ) ;
x-- ;
y++ ;
}}

(2) If the ages of Aslam, Akram and Munir are input through the keyboard, Draw a flowchart to
determine and print the name of the youngest of the three. (8)

(3) Write a program to print the multiplication table of the number entered by the user. The table
should get displayed in the following form. (9)
29 * 1 = 29
29 * 2 = 58
(4) Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs.
12.00 per hour for every hour worked above 40 hours. Assume that employees do not work for
fractional part of an hour. (8)
(5) In a company an employee is paid as: If his basic salary is less than Rs. 1500, then HRA = 10%
of basic salary, DA = 90% of basic salary and CA=20% of basic salary. If his salary is either equal
to or above Rs. 1500, then HRA = Rs. 500 , DA = 98% of basic salary and CA=25% of basic salary.
If the employee's salary is input through the keyboard write a program to find his gross salary. (10)

You might also like