Mca 103
Mca 103
Mca 103
htt
Roll No. : ………………………………………………………...
Invigilator's Signature : ……………………………………….
CS/MCA/SEM-1/MCA-103/2012-13
p:/
2012
COMPUTER PROGRAMMING WITH C
Time Allotted : 3 Hours Full Marks : 70
/q
The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words
pap
as far as practicable.
GROUP – A
( Multiple Choice Type Questions )
1. Choose the correct alternatives for the following :
er.
10 1 = 10
#define N 2 + 3
wb
main()
{ int a;
ut .
a = N* N;
printf("%d",a);
a c.
a) 25 b) 13
c) 0 d) none of these.
in
{ int a [] = { 0, 1, 2, 3, 4 };
p:/
int k, * p;
a) 01234 b) 024
main()
wb
{ int a [2][3] = { 1, 2, 3,
4, 5, 6
ut .
};
printf("%d",* ( * (a + 1 ) + 2));
a c.
a) 6 b) 2
1117 2
CS/MCA/SEM-1/MCA-103/2012-13
main()
wb
if(s1= = s2)
ut .
printf("Equal");
else
printf("Unequal");
a c.
}
a) Equal b) Unequal
main()
p:/
{ char s[]= "hello";
}
/q
a) 0 b) 5
pap
c) Compiler error d) none of these.
#include<string.h>
er.
main()
{ char ch[5];
wb
int j;
ch[j]=65;
ut .
ch[j]='\0';
printf("%s", ch);
a c.
a) AAAA b) AAAAA
1117 4
CS/MCA/SEM-1/MCA-103/2012-13
{ int a = 5;
p:/
printf("%d",a-- );
}
/q
a) 4 b) 5
c) 0 d) none of these.
pap
a) / b) +
c) * d) &.
er.
GROUP – B
( Short Answer Type Questions )
Answer any three of the following. 3 5 = 15
wb
statement. 3+2
in
1
1 0 1
p:/
1 0 1 0 1
1 0 1 0 1 0 1
GROUP – C
( Long Answer Type Questions )
/q
Answer any three of the following. 3 15 = 45
7. Distinguish between Automatic and Static variables. Write
pap
two C programs that calculate factorial of a number using
recursion and iteration ? Write a function to sort the
characters of the string passed to it as argument. 2+5+8
10. What are the different functions used for file handing ?
numbers and then reads all numbers of this file and writes
all odd numbers to other file called odd and writes all even
numbers to a file called. 5 + 10
in
1117 6
CS/MCA/SEM-1/MCA-103/2012-13
b) Macro
p:/
c) Recursion
d) Pointer
/q
e) Storage classes in C.
pap
er.
wb
ut .
a c.
in