Get premium membership and access revision papers, questions with answers as well as video lessons.

Bit 2122:Structured Advanced Programming Question Paper

Bit 2122:Structured Advanced Programming 

Course:Bachelor Of Information Technology

Institution: Meru University Of Science And Technology question papers

Exam Year:2013




INSTRUCTIONS: Answer question one and any other two questions
QUESTION ONE – 30 MARKS
(a) Explain criteria a programmer should use to evaluate a programming language. (4 marks)
(b) Outline the format of a C program. (4 marks) (c) Use an example to differentiate between a compound statement and simple statement. (2marks) (d) Compare the two methods used to declare a constant in C programming giving an example in each case. (2marks)
(e) Write a C program to input two numbers then use a user defined function to calculate the sum of the two numbers entered and display the result. (4 marks)
(f) Differentiate between break and continue statements used in controlling loops. (2 marks)
(g) Explain the importance of comments and describe the two types of comments used in C programming. (3 marks) (h) Briefly describe the purpose of the following as used in programming (4marks)

2
i. Editor ii. Linker (i) Write a C program to enter 6 numbers into an array then display the biggest and the smallest number. (5 marks)
SECTION 2 (a) Evaluate structured programming capabilities in developing a system based on the following functions: (4marks) i. Control structures ii. Interface design (b) i) A retail shop wish to acquire a program to enter product name, price and product type code which determines discount issued. For code S, discount is 10% of price, code R discount is 6% of price, code T discount is 3% of price and there is no discounts for code p. write a C program to input code, product name and price then calculate discount and net price. (6marks)
(c) Write a C program to display numbers as shown below. (5marks)
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
(d) Write a program to input a word then display the number of characters entered. (5 marks)
QUESTION THREE (a) Compare switch and if statements explaining where each can be applied appropriately. (4 marks) (b) Writer a Pascal program that reads the radius of a sphere and calculate the volume. Where volume =????3 . (4 marks) (c) Design a C program to input employee name , hours worked and rate per hour via the keyboard then calculate the basic pay = hours worked * rate per hour. The program should store employee name and basic salary into a text file called employee.txt. (6 marks)

3
(d) Discuss challenges of developing a system using C programming language as compared to other programming languages. (6 marks) QUESTION FOUR (a) Use an example to illustrate the structure of a C function. (4 marks)
(b) Write a program to enter 8 numbers then sort the numbers using linear sort technique. (6 marks) (c) Write a program to create a data structure to store student name, mathematics, English and Kiswahili marks then calculate total marks and average marks. The program should allow input via the keyboard then output result into a text file called student.txt. (6 marks)
(d) Write a program a Pascal program that converts temperature from degrees Celsius to Farenheight. Where Farenheight = 32 + 9 5 * Celcius. The program should be presented on the screen in the following format: 15 degrees Celcius is equal to 93.2 degrees Celcius. (4 marks)
QUESTION FIVE a) Before the introduction of relational database, information system data were stored in text files for future retrieval and data organization. Currently information systems make use of database management system to organize and store data. Explain any 2 challenges that led to shifting from storage of data in text files to relational database management system. (4 marks)
b) ABC bank issue loans to members based on customer deposit amount, period after customer opened an account with the bank and security value. ? If customer deposit amount is over 1 million a loan of up to 2 million is issued. ? If customer deposit is between 500,000 and 1,000,000, loan of up to 1 million is issued. ? If customer deposit amount is below 500,000 loan of up to 1 million is issued if customer account is 5 year and above old otherwise a customer must provide security to be issue with a loan amount equal to security value. i. Design a decision tree to implement the above conditions. (4 marks) ii. Design a program using nested if to enter customer name, customer deposit amount, Period after opening account and security value then determine and display loan amount to be issued. (6 marks) c) Design a program to display 5 by 5 multiplication table. (6 marks)






More Question Papers


Popular Exams



Return to Question Papers