Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MCS 011june 13

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

No.

of Printed Pages : 3 MCS-011


MCA (Revised)

Term-End Examination
June, 2013

MCS-011 : PROBLEM SOLVING AND


PROGRAMMING
Time : 3 hours Maximum Marks : 100
(Weightage 75%)

Note : Question number 1 is compulsory. Attempt any three


questions from the rest.

1. (a) Explain type cast and size of operator in C 6


language with example.

(b) Write an algorithm to check whether the 5


given number is prime or not.

(c) What is the difference between High level 6


language and low level language ? Why C
is referred as middle level language ?

(d) How many bytes are assigned to store for 3


following :

(i) Double

(ii) Unsigned char

(iii) Unsigned integer

MCS-011 1 P.T.O.
(e) Write a program segment to generate the ' 6
following pattern using "for" and
"while loop"

*
**
***
****

Explain the concept of stepwise refinement 4


technique.
Give the C expression for the following 6
algebraic expression :

ab4c2 — d
(i) m—n

(ii) ab — [(e + f)9 /c]

(h) What is a logical error ? Give an example 4


of logical error in C.

2. (a) What is a structure ? How structures are 10


passed as function arguments ? Explain
with an example.
(b) What is an array ? How arrays are declared 10
and initialized ? Write a C program to add
two matrices of 3 x 3 using arrays.

MCS-011 2
3. (a) Write a program to find out square and cube 6
of given number using macros.
(b) What is # define preprocessor in C. How it 4
is implemented and used in C ?
(c) What is a string ? Write a function in C to 10
convert lower case letters to upper case
letters in a given string without using
strupp ?

4. (a) What are address and indirection operators 10


in C ? How strings are declared through
pointers ? Write a program that test a string
for a palindrome using pointer notation.
(b) Give the types of file supported in C. 10
Explain formulated Input/Output functions
as well as string Input/Output functions.

5. (a) Explain the use of following functions in 10


C:
(i) Calloc function
(ii) realloc function
(iii) fseek ( )
(iv) f tell ( )
(v) str cpy ( )
(b) Differentiate Sequential and Random Access 4
files.
(c) Explain briefly null pointer assignment. 6
Write a program in C to illustrate this
concept.

MCS-011 3

You might also like