Aio Mcs11 Tee
Aio Mcs11 Tee
P
MCS-011(S) : PROBLEM SOLVING AND
AP
PROGRAMMING
P
(side x side)
AP
2. (a) What is the use of malloc ( ) function ?
Illustrate it with the help of a program
segment. 4
E
AC
(b) Write any four string functions and explain
their usage with example program
segments. 8
SP
1,000. 8
N
P
AP
5. (a) Summarize the purpose of the format
strings "%f, %s, %d, %c", which are
commonly used with the printf and scanf
functions with the help of an example for
each. E 10
AC
(b) When can we find the product of
2 matrices ? Also, write a program in C to
SP
MCS-011(S) 3 500
No. of Printed Pages : 3 mcs-0 111
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question no. 1 is compulsory.
three questions from the rest.
Attempt any
AC
1. (a) Explain how you will analyse the efficiency
SP
of an algorithm. 10
(b) Design a flow chart and write an algorithm
to calculate the factorial of a given number
U
using recursion. 10
O
P
"UNIX" in the following format : 10
AP
U
UN
UNI
UNIX
UNIX
UNI E
AC
UN
U
SP
MCS-011 2
. (a) Write a program to swap two values of
variables, using pointers. 10
(b) Write a program, using structures to read
and display data for 10 students. 10
Hint : Assumptions can be made wherever
necessary.
P
5. (a) Write a macro to display the string
AP
"COBOL" in the following format : 10
C
CO
COB
COBO E
AC
COBOL
COBOL
COBO
COB
SP
CO
C
U
MCS-011 3 12,000
No. of Printed Pages : 2 mcs- on
MCA (Revised) / BCA (Revised)
Term-End Examination
December, 2016
P
MCS-011 : PROBLEM SOLVING AND
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question no. 1 is compulsory. Attempt any
AC
three questions from the rest.
P
AP
3. (a) Write a program to print the first 10 even
numbers using "goto" statement. 10
using arrays. E
append the second string to the first string,
10
AC
4. (a) Write a program to swap the values using
the Pass by Value and Pass by Reference
SP
methods, separately. 10
commands. 10
IG
MCS-011 2 15,000
No. of Printed Pages : 3
1 X5 4
I mc s-c• 11
MCA (Revised) / BCA (Revised)
Term-End Examination
December, 2015
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question number .1 is compulsory. Answer any
three questions from the rest.
AC
1. (a) Draw a flowchart and write a program in
SP
MCS-01 1 1 P.T.O.
(d) Explain the use of the following data types
with an example for each : 10
(i) enumerated data type
(ii) type def
P
program to copy the contents of string 2 to
string 1, and find the length of the copied
AP
string using pointers. 10
(ii) Break
N
(iii) Exit.
IG
(iv) Continue
MCS-011 2
4. (a) Write a program in 'C' to display the
following output : 10
1
2 2 2
3 3 3 3 3
4 4 4 4 4 4 4
3 3 3 3 3
2 2 2
P
1
AP
(b) Explain the following with examples : 4x2 1 =10
2
(i) Unary operators in 'C'
(ii)
E
Multidimensional Array
AC
(iii) Syntax and Semantic errors
(iv) Size operator
SP
MCS-01 1 3 1 9,000
No. of Printed Pages : 4 I MCS-011
MCA (Revised) I BCA (Revised)
Term-End Examination
June, 2015
02493
P
mcs-011: PROBLEM SOLVING AND
AP
PROGRAMMING
E
Note : Question number 1 is compulsory. Answer any
AC
three questions from the rest.
SP
MC S-011 P.T.O.
(e) List and explain the precedence of
Arithmetic, Logical and Relational
operators in 'C'. 10
P
in 'C' ? Explain with an example. 5
AP
(b) Write a loop that calculates the sum of n
elements of the following series :
1 + 4 + 7 + 10 + 13 ....
E
Use the loop during programming in the
AC
following two different ways : 10
(i) Using while loop
SP
MCS-011 2
(b) Write a program in 'C' to print the
following output 'n' rows. For example, if
n = 3, the following should be output by the
program : 10
1
1 2 1
P
1 2 3 2 1
1 2 1
AP
1
(iv) gets( )
(v) puts( )
(b) Write a program to multiply 2 matrices of
size 3 x 3. 10
U
declaration :
N
MCS-011 3 P.T.O.
(b) Write a recursive program in 'C' to check
whether a given string is a palindrome or
not. 10
P
statement. 5
AP
E
AC
SP
U
O
N
IG
MCS-011 4 12,000
No. of Printed Pages : 2 MCS-011
P
MCS-011 : PROBLEM SOLVING AND
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question number 1 is compulsory. Answer any
three questions from the rest.
AC
1. (a) Design an algorithm and draw a
SP
MCS-011 1 P.T.O.
2. (a) Write a program that initialises 3 names in
an array of strings and displays them. 5
(b) What is call by value ? Give example. 5
(c) Explain recursion program with a suitable
example. 10
P
numbers using goto statement.
AP
(b) Explain Function Prototypes with an
example for each. 10
(c) Write a program to perform the
comparison of two strings (use string
function).
E 5
AC
4. (a) Write a program in C to sort list of n
integers, using any of the sorting
algorithms. 10
SP
MCS-011 2 14,000
No. of Printed Pages : 2 MCS-011
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
Note : Question Number 1 is compulsory. Answer any three
questions from the rest.
E
AC
1. (a) Write an algorithm and draw 10
corresponding flowchart to calculate the
factorial of a given number.
SP
2.
IG
MCS-011 1 P.T.O.
3. (a) What is the use of continue statement ? 5
Explain with an example.
(b) Explain any four string functions with 10
example for each.
(c) How will you write a function with no 5
arguments and with return value ? Give an
example.
P
(b) Write a program in C to multiply two 10
AP
matrices A and B.
MCS-011 2
No. of Printed Pages : 3
MCA (Revised)
N Term-End Examination
C
December, 2012
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weigh take 75% )
MCS-011 1 P.T.O.
2. (a) Explain null pointer assignment. Also give 4
an example of use of null pointer.
(b) Write a macro for the following : 2x3=6
(i) to find square of a given number.
(ii) to find smallest of 3 given number.
(c) Write a program in 'C' to enter two 4 x 4 10
matrices and to display the product of these
P
matrices. Explain and give suitable
AP
documentation.
A
(b) Give the syntax of getch( ) and gets( ). Give 4
examples also.
U
MCS-011 2
(c) Differentiate between a structure and a 8
union. Write a structure for a student and
write a 'C' program to display the marks of
the student for five subjects and also
calculate the percentage of marks obtained.
P
scarf() and printf( ).
AP
(b) Give 5 distinctive features of 'C' which states 6
it to be a structured programming. What
are the differences between a low level, a
E
middle level and a high level language. Give
examples.
AC
(c) Write a program to display the following 5
patterns :
1 2 3 4 5
SP
2 3 4 5
3 4 5
4 5
U
5
(d) What is array of pointers to string? Declare
O
5
an array of pointers to string having names
N
MCS-011 3
No. of Printed Pages : 3 MCS-011
MCA (Revised)
Term-End Examination
June, 2013
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
following :
(i) Double
MCS-011 1 P.T.O.
(e) Write a program segment to generate the ' 6
following pattern using "for" and
"while loop"
*
**
***
P
****
AP
Explain the concept of stepwise refinement 4
technique.
Give the C expression for the following 6
algebraic expression :
E
AC
ab4c2 — d
(i) m—n
SP
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
P
strupp ?
AP
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.
E
(b) Give the types of file supported in C. 10
AC
Explain formulated Input/Output functions
as well as string Input/Output functions.
SP
(iii) fseek ( )
O
(iv) f tell ( )
(v) str cpy ( )
N
files.
(c) Explain briefly null pointer assignment. 6
Write a program in C to illustrate this
concept.
MCS-011 3
No. of Printed Pages : 3 MCS-011
MCA (Revised)
Term-End Examination
June, 2012
fl
MCS-011 : PROBLEM SOLVING AND
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question number 1 is compulsory.
Attempt any three questions from the rest.
AC
1. (a) It is said that 'C' is a middle level language. 10
SP
MCS-011 1 P.T.O.
(d) Differentiate between : 21/2x2=5
(i) Function and sub routine
(ii) Structure and Union with examples
of each.
(e) Give the precedence chart for the operator
in 'C'.
P
(a) Differentiate between an execution error 4
AP
and a syntax error. Give examples of
execution and syntax errors.
(b) Write and explain the action of 'WHILE' 8
E
statement. Develop a program to compute
AC
the average of every 3rd integer lying
between 1 and 100.
(c) Write a program in 'C' to copy the contents 8
SP
user.
(b) Differentiate between goto statement, break 4
and continue.
(c) What is an assignment operator ? Give 3
example of its usage.
MCS-011 2
(d) What is a pointer to an array? Differentiate 8
it from an array of pointers. Write a
program using pointer to array to calculate
the sum of n given numbers.
P
function, what function must be used to
AP
release allocated memory which is no longer
used ? Give syntax also.
(c) Write a recursive function in 'C' to count 8
E
the number of nodes in a singly linked list.
AC
5. (a) How are arrays processed in 'C' ? Illustrate 6
with the help of 2-D arrays as examples.
SP
(i) x?
(x + 2) ?
(iii) *x?
(iv) *(x + 2) ? Explain the results.
MCS-011 3
No. of Printed Pages : 3 m cs-0111
MCA (Revised)
Term-End Examination
December, 2011
0-•
O
MCS-011 : PROBLEM SOLVING AND
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
Note :
E
Question number 1 is compulsory. Answer any three
qu. estions from the rest.
AC
1. (a) What are different basic data types in C ? 10
SP
MCS - 011 1 P.T.O.
P
2. (a) Write a function subs(s, n) in C, which 5
prints the first n-characters of the string s
AP
provided n is less than the length of the
string.
(b) Write a program in C to display the string 5
E
"ARRAY" in the following format :
AC
A
AR
SP
ARR
ARRA
ARRAY
U
MCS-011 2
(c) Explain the syntax of do-while statement.
Also differentiate do-while from while
statement.
P
(b) Write a C program using array to find the 10
AP
average price of apples and oranges, in ten
cities in the country.
5.
E
(a) Write a C program to store string "This is 10
AC
my file" in a file.
MCS-011 3
No. of Printed Pages : 3 MCS-011
MCA (Revised)
Term-End Examination
June, 2011
P
MCS-011 : PROBLEM SOLVING AND
AP
PROGRAMMING
Note : E
Question number 1 is compulsory. Answer any three
AC
questions from the rest.
SP
programming language C :
N
sum = 0;
IG
MCS-011 1 P.T.O.
(d) What is a syntax - error ? Give an example
of syntax error in a C - program.
P
(f) Explain the use of malloc function in 5
AP
C programming.
2.
E
(a) What is an array ? Write a C program to 10
add two matrices of 3 x 3 using arrays.
AC
(b) What is the scope of a variable ? Explain 10
difference between global and local variable
SP
MCS-011 2
4. (a) What is a file in C programming ? Explain 10
the use of fopen function in file handling.
Explain different mode in which a file can
be opened.
(b) What is a pointer ? Write a C program 10
using pointer to print the name and price
P
of the items sold in a retail shop on a specific
date.
AP
5. (a) What is a structure ? Explain how a 10
E
structure is declared in C. Write a program
in C using structure to store records of
AC
students in a class of 20 students.
(b) Write a C program to demonstrate the use 5
SP
number.
O
N
IG
MCS-011 3
IG
N
O
U
SP
AC
E
AP
P
IG
N
O
U
SP
AC
E
AP
P
IG
N
O
U
SP
AC
E
AP
P
No. of Printed Pages : 3 mcS-on I
MCA (Revised)
O Term-End Examination
O June, 2010
O
MCS-011 : PROBLEM SOLVING AND
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
questions from the rest.
AC
1. (a) Write a program in C to search a record in 10
SP
an existing file and to update it.
Explain the concept of array of pointers. 10
Using pointers write a program to test
U whether the given string is a palindrome or
not.
O
Differentiate between
N
MCS-011 1 P.T.O.
P
multiplication of 2 matrices of size (3 x 3).
AP
(b) Write a macro for the following : 4x2=8
to find largest number among 3 given
numbers.
E
to find cube of a given number.
(c) Write a program in C, using structures to 7
AC
generate a report for students which
displays Roll No. and Name of student, total
marks obtained by the student. Assumptions
SP
can be made wherever necessary.
4. (a) Write a program and flowchart to display 8
U the following pattern :
H
O
He
N
HeL
HeLL
IG
HeLLO
HeLL
HeL
He
H
MCS-011 2
Write a macro to demonstrate : 6
#define, #if, #else
preprocessor commands.
Write a program in 'C' to find 6
12 +32+ 52+ 72 +92+ +N2
P
5. (a) Write a program to append the contents of 7
AP
second file to the contents of first file.
Explain the difference between a top-down 5
approach and a bottom-up approach in
E
programming.
AC
What do you understand by a decision- 8
control statement ? Give an example of
each.
SP
U
O
N
IG
MCS-011 I
MCA (Revised)
Term-End Examination
7 . December, 2009
P
N PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
E
Note : Question Number 1 is compulsory. Answer any three
question from the rest.
AC
1. (a) Develop an algorithm, and write a program 10
SP
'C' language.
IG
int i = 1, j = 1;
for (;;)
P
if (i > 5)
AP
break;
else
j + = 1;
printf ("In %d", j)
E
AC
i + = j;
}
SP
MCS-011 2
(a) What are the precautions that must be taken 10
care to use macros in 'C' ? Define a macro
to find the factorial of a given number n ?
(b) Write a program in 'C' to find whether a 10
given number is Amstrong number or not.
P
(a) Write program in 'C' for the multiplication 10
AP
of two square matrices.
(b) What is pointer variable ? How is a pointer 10
variable declared ? How is the address of a
E
pointer variable determined ? How pointer
can be used to pass an entire array to a
AC
function in C ? Explain with the help of an
example.
SP
stropy function.
IG
-o0o-
MCS-011 3
MCA (Revised)
!o Term-End Examination
br-)
\o ]une, 2009
6\
MCS-011 : PROBTEM SOLVING AND
P
PROGRAMMING
AP
Time : 3 hours Maximum Marks : 100
pVeightage75%)
following :
N
MCS-011 P.T,O.
(d) Write the output of the following program :
main( )
t
int x :2, y:3, 51,32 ;
S L- x + ( + + y ) ;
P
32: * *x*y+ +;
AP
printf ("%d%d%d%d\n",
51,52,x, y);
(e)
E
Differentiate between structure and union.
AC
2. (u) Summarize the purpose of the format strings 10
(like %s, %d, %c) that are corrunonly used
SP
1
1 2 L
r 2 3 2 1
1 2 L
1
MCS-011
3. (u) Write a Program in 'C to copy one file to 10
another. The program should read the
filenames at command line.
(b) Explain the meaning and usage of each of
the following function prototypes : 5x2=10
(0 getch ( )
P
(i0 strcmp ( )
AP
(iii) getchar ( )
(i") gets ( )
(") puls ( )
E
AC
4. (u) 'C'
Write a Program in in which a 10
two-dimensional affay is represented as an
array of integer pointers to a set of single
SP
(b) 'C' L0
Write a program to find the sum of the
given series :
U
-oOo-
MCS-011
IG
N
O
U
SP
AC
E
AP
P
MCA (Revised)
Term-End Examination
December,2(X)8
P
AP
' MCS-011: PROBLEM SOLVING AND
PROGRAMMING
Time : 3 hours MaximumMarks :100
|f)
E
(Weightage75%)
AC
nfoA : Questionnumberl is compulsory. Answerany three
!
.-{ questionsfrom the rest.
SP
P
Examination). Pass (40%) in both the
components are compulsory. Grades may
AP
be given accordingly. Assumptions can be
made if necessaryand specify them.
E
"&&' ? Explain with an example.
AC
(c) Write a loop that calculate sum of. the n 5
elements of the series:
SP
'1.
+7 +13 +'1,9+ 25 +
Write the loop in 3 different ways :
P
with an example for each:
AP
(i) enumerated data type.
(ii) typedef.
E
J. (a) Design an algorithm and draw 10
AC
corresponding flow chart to convert a
decimal number to its Hexadecimal
equivalent.
SP
(with an example)
(i) Auto
O
(it Register
N
-oOo
IG
IG
N
O
U
SP
AC
E
AP
P
'MCA (Revised)
Term-End Enamination
June. 2OO8
P
AP
MCS-011: PROBLEMSOLVINGAND
PBOGRAMMING
MCS-o1
1 P.T.o.
(d) 'array of pointers' ? Write a
What do you mean by
program in C to calculate the difference of ihe
corresponding elements of tr,vo arrays of integers of
same size. 10
P
each):
(i) *define
AP
(i0 enurn
file.
MCS-Or
1
4. (a) Write a program which reads a file and counts the
number of lines and words in the file, assumingthat
a line can contain at most 80 characters. g
(b) Give differences betvveen r 6
(i) Sequential and Random Access files
(ii)
P
Global varlable and Lncal r/adable
(c) Write a program and flowchart to display the
AP
followingpattem: 6
1
2 3
4 5 6 E
AC
7 8 9 1 0
11 12 13 14 15
SP
16 17 18 19 20 2l
M C S - O I1 3 14,OOO
IG
N
O
U
SP
AC
E
AP
P
Mc$011@
MCA (Revised)
Term-End Examination
June, 2OO8
P
AP
MCS-011@: PBOBLEMSOLVTNG
AND
PROGRAMMING
Time : 3 hours MaximumMarks: 700
E (Weightage75Vo)
AC
Note r Question number 7 is compulsory. Attempt ang
th"ee questionsfrom the rest-
SP
(b)
Write a program in 'C' to calculatethe cube of a
O
M C S - 011@ P.T.O.
x be
2. (a) When can 2 matrices of order a x b and c d
product
multiplied ? Write a program in C to find the
of 2 such matrices'
(b) Wdte a program to create a file of records,read the
records and Print the same.
to
(c) Draw a flowchart and wdte a program using C
P
convert a decimal number to its hexadecimal
equivalent.
AP
3. (a) What are the precautions that must be taken care of
to use macros in C ? Define a macro to find the
product of n numbers
in
(c) Write a program in'C'to sort a list of strings
alphabetical order, using an array of pointers'
10
U
following format :
70
N
I
l 2
IG
7 2 3
| 2 3 4
7 2 3 4 5
r 2 3 4 5 6
M c s - 011o
(b) What do you understand by a decision control
statement ? Give an example in the form of a
progrdm in 'C' to illustratethe use of if-then-else'
'switch-case'
and in a menu-drivenprogram. 7
(c) Give an example to give use of enum in 'C'
language. J
P
5, (a) Differentiate between a 'structure' and a 'union'.
AP
Give the s/ntax of both. Illustrateeach with the help
of an example.
(b) Write a program in'C'to concatenate2 strings
'strl'
namely
function. E
and str2' without the use of strcat
AC
(c) Write a loop that calcr-rlates
the sum of the given
senes i
SP
1 + 3 + 5 + 7 + 9 + 1 1+ . . . . . .
Write the loop in three different ways ; 10
(i) while loop
U
M c s - 011o 4,OOO
IG
N
O
U
SP
AC
E
AP
P