Bit 1303A Programming Methodology Question Paper
Bit 1303A Programming Methodology
Course:Bachelor Of Science In Information Technology
Institution: Kca University question papers
Exam Year:2014
UNIVERSITY EXAMINATIONS: 2013/2014
ORDINARY EXAMINATION FOR THE BACHELOR OF SCIENCE
IN INFORMATION TECHNOLOGY
BIT 1303A PROGRAMMING METHODOLOGY
DATE: AUGUST, 2014
TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO
QUESTION ONE
a) Define the following as they apply to programming
i.) Flowchart
ii.) Pseudocode
iii.) Object code
iv.) Pointer
v.) Pre-processor directive
[5 Marks]
b) Name any four rules adopted in naming variables
[2 Marks]
c) A program is required to calculate and output the sum and product of all odd integers
between 39 and 87 inclusive.
As part of your solution to the problem above, write:
i). An algorithmic solution for your answer
ii). Draw a flow chart to represent this
[5 Marks]
d) Differentiate between the following
i). Keyword and identifier
ii). Function prototype and function definition
iii). Define and include preprocessor commands
[6 Marks]
e) Write a program segment that does the following;
i). Initialize the 5 element of an integer array count to zeros
1
ii). Add 2 to each of the 5 elements of the array count
iii). Print the 5 values of the array count sorted in ascending order
[9 Marks]
f) Differentiate between a struct and a Union
[2 Marks]
g) Define a pointer showing how an describing how and integer pointer is initialized
[1 Marks]
QUESTION TWO
Make a structure declaration for an ACCOUNT with the following members
Accno
Balance
Acc_name
[4 Marks]
a) Using the structure defined above, write a statement that creates a structure variable
called Saving_Account
[2 Marks]
b) Using the variable, write a program segment to perform the each of following
i.) Access the structure member balance and assign to it the value 200
ii.) Read a name through the keyboard and store it in the address for account name
[5 Marks]
a) Define what you understand by the following concepts
a) Modular programming
b) Structured Programming
[4 Marks]
b) Explaining whether the following statements are valid or invalid
a) int =0 total;
b) float total@
c) sum+=k;
d) define const pi 3.14;
e) include “c:\first.c”
[5 Marks]
QUESTION THREE
a) Structured programming is characterized by the following;
i.) Variables
ii.) Control structures
2
iii.) Assignments
iv.) Modules
Explain the role played by each of the above feature
[16 Marks]
b) List and briefly explain 2 ways that data is shared in C
[4 Marks]
QUESTION FOUR
a) A program is required to compute the sum of even numbers between 30 and 366.
i.) Write a pseudocode as part of the solution to this problem
ii.) Draw a flowchart to depict solution to the problem
iii.) Implement the above using C
[8 Marks]
b) Explain with a diagram how a while control construct differs from a do while
[4 Marks]
c) Give one similarity and 3 differences between a compiled and interpreted Language
[4 Marks]
d) Define what a comment is in C and their importance
[4 Marks]
QUESTION FIVE
a) Define the following
i.) Function prototype
ii.) Function call
iii.) Function definition
[6 Marks]
b) Write a program that can be used to get the area and volume of a cylinder (Hint:
area=2 PI r(r + h) and volume=PI r2 h)
As a solution to the problem, write a function AREA and VOLUME to
return
the respective values. These functions are called via main ()
[11 Marks]
c) Define the following
i.) Syntax
ii.) Semantic
iii.) Programming Language.
[3 Marks]
3
More Question Papers
Exams With Marking Schemes