How To Exam?

a knowledge trading engine...


DOEACC Society 2009 Bachelor of Computer Application (B Level) Programming and Problem solving through C - Question Paper

Thursday, 13 June 2013 12:00Web
C) 1
D) 7

2. every statement beneath is either actual or FALSE. select the most improper one
and ENTER in the "tear-off" sheet attached to the ques. paper, subsequent
instructions therein. (1 x 10)
2.1 Scalar data kinds are not supported by 'C' language.
2.2 'C' language allows arrays of any dimensions.
2.3 A structure cannot be learn as a single entity.
2.4 The associativity of operator ! is from left to right. .
2.5 J++ executes faster than J+1 because ++ is faster than +.
2.6 2 structures cannot be compared automatically.
2.7 The code "a[i] = i++;" is valid and will execute.
2.8 Arrays automatically allocate space when declared.
2.9 sizeof('a') is not 1.
2.10 Float value can be added to a pointer.
3. Match words and phrases in column X with the nearest related meaning/
word(s)/phrase(s) in column Y. Enter your selection in the "tear-off" ans sheet
attached to the ques. paper, subsequent instructions therein. (1 x 10)
X Y
3.1 The operator && is an example of A. Arrays
3.2 Preprocessor commands are always
preceded by
B. Storage class
3.3 Header files in 'C' contain C. /0
3.4 Structures in 'C' can be used with D. Shifting bits
3.5 Static describes a E. #
3.6 Null character is represented by F. string.h
3.7 File manipulation functions are available
in
G. Masking
3.8 An example of unconditional control
structure is
H. Switch statement
3.9 Header file needed for strcpy I. Logical
3.10 The bitwise AND operator is used for J. #define
K. Macro definitions
L. stdio.h
M. Goto
N. strcpy
O. Library functions

4. every statement beneath has a blank space to fit 1 of the word(s) or phrase(s) in
the list beneath. Enter your option in the "tear-off" ans sheet attached to the
ques. paper, subsequent instructions therein. (1 x 10)
A. integer array B. pointers C. program
D. printf( ) and scanf( ) E. character array F. &&
G. function H. Main I. getw( )
J. reference, value K. static L. for
M. extern N. ternary O. register
P. putw( ) Q. main( )
4.1 Formatted I/O can be produced with the routine(s) ________.
4.2 The ________statement is used to loop as long as a specified condition is met.
4.3 To create a string variable, me must declare a(n) ________ with enough elements to
contain the entire string.
4.4 Call by ________ is more efficient than call by file.
4.5 exit( ) function is used to terminate the ________.
4.6 The only operator that contains 3 operands is ________ operator.
4.7 The declaration ________ does not allocate storage space for variable.
4.8 The function ________ reads an integer from a file.
4.9 All buffers are cleared when a ________ closed.
4.10 Preprocessor directives are placed in the source program before the function ________.

PART TWO
(Answer any 4 questions)
5.
a) elaborate the commonly used input functions in 'C'? Write their syntax and discuss the
purpose of every.
b) Develop a flowchart and then write a program to calculate the roots of a quadratic
formula A*X^2 + B*X + C = 0. Allow the possibility that (B^2 – 4*A*C) <= 0.
(6+9)
6.
a) elaborate logical, syntactic and execution errors? provide examples of every. Which is most
difficult to obtain and why?
b) Enumerate features of a good 'C' program. define the commonly used techniques as
to how 'C' programs can be made highly readable and modifiable.
c) What is an algorithm? Develop an algorithm to test whether a provided number is a prime
number.
(5+5+5)
7.
a) Develop loops using
i) While statement
ii) Do-while statement
iii) For statement
that will compute the sum of every 3rd integer, beginning with k=2 for all values of
k <= 100.
b) Write a function that will calculate
Y = X^n
Where Y and X are floating point numbers and n is an integer number. Use this function
and print the output
X n Y
… … …
Check for possible exceptions that may occur during calculations with regard to the
magnitude of calculated values.
(6+9)
8.
a) How does an array differ from a structure? provide and discuss the syntax of array and
structure as described in 'C'.
b) How are one-dimensional and two-dimensional arrays stored in computer memory?
Illustrate with an example.
c) Develop a program to multiply 2 matrices with sizes 3x4 and 4x5. Your program
should take care of the fact that no element of either matrix can be negative. Include
improper documentation.
(6+2+7)
9.
a) provide the main advantage of storing data as a file. define different ways in which data
files can be categorized in 'C'. Illustrate by examples.
b) What is an indirection operator? discuss its usage to access a multidimensional array
element. Illustrate your ans by an example.
c) 'C' compiler supports many pre-processor commands. Write their names only.
(6+6+3)







( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER DOEACC Society 2009 Bachelor of Computer Application (B Level) Programming and Problem solving through C - Question Paper