Programming Languages for Mathematicians
Programming Languages for Mathematicians
GC UNIVERSITY LAHORE
OBJECTIVE QUESTION PAPER
PROGRAM: BS (Hons.)
EXAMINATION: FINAL 2022 SEMESTER:III
TITLE: PROGRAMMING LANGUAGES FOR MATHEMATICIANS
COURSE CODE:MATH-2102
TIME ALLOWED: 20 MINUTES MAX MARKS:10
ROLL. NO._____________________ NAME:______________________________
DEPARTMENT OF MATHEMATICS
GC UNIVERSITY LAHORE
SUBJECTIVE QUESTION PAPER
PROGRAM: BS(Hons.)
EXAMINATION: FINAL 2022 SEMESTER:III
TITLE: PROGRAMMING LANGUAGES FOR MATHEMATICIANS
COURSE CODE:MATH-2102
TIME ALLOWED: 160 MINUTES MAX MARKS:40
NOTE: Attempt any FOUR Questions
Question. No. 2. (a) What is the purpose of default statement in switch statement, justify your
answer with example. 5
(b) What is the difference between high level and low level languages. 5
Question. 3. (a) Write a program that inputs a five digit number from the user and displays
it in reverse order. 6
(b) Write a program that inputs an integer and displays whether it is even or not. 4
Question. No. 4. (a) Write a program to displays the following Fibonacci numbers
1 1 2 3 5 8 13 21 34 55 89 6
Question. No. 5. Write down a program to generate a result card of a student that includes
the detail of four subjects, the percentage of overall total and grade as you defined. 10
Question. No. 6. Write down a program that accept an integer from user and print the factorial
of the number. 10