CA 103: C LANGUAGE (2019 Pattern)
Question Paper Aug 2022
BBA(CA) (Semester - I)
Q1) Answer the following (any Eight):
a) What is variable?
b) Write syntax of for loop.
c) What is an Array?
d) Explain continue statement.
e) Define functions.
f) Explain bit wise and operator in C.
g) Define pointer.
h) Write two advantages of structure,
i) Draw any two symbols of flow chart.
j) Write syntax and example of strlen () string function in C.
Q2) Answer the following (any four):
a) Explain if-else statement with example.
b) What is 2-D Array? How to represent 2D Array in memory.
c) Explain call by value and call by reference.
d) Write program to check whether a input number is Armstrong number or not
e) Write a program to copy string without using standard function.
Q3) Answer the following (any three):
a) Explain logical operator in C. With example.
b) Explain in detail pointer arithmetic.
c) Write an algorithm and draw flow Chart to find maximum of three numbers.
d) Write a program to calculate sum of even digits of a input number using function
[eg: 1 2 3 4 output: 6]
2+4->6
Q4) Answer the following (any three):
a) Explain basic data types in C.
b) Explain in detail while loop with suitable example.
c) Write a program to swap the values of two variables.
d) Write a program to find the sum of following series:
Q5) Trace the output of the following (any two):
a)
main()
{
float arr[] = {12.4, 2.3, 4.5, 6.7};
printf("%d\n", sizeof(arr)/sizeof(arr[0]));
getch();
}
b)
main()
{
int a = 500, b = 100, c;
if(!a >= 400)
b = 300;
c = 200;
printf("b = %d c = %d\n", b, c);
getch();
}
c)
main()
{
char *P1="Pune",*P2;
P2=P1;
P1="University";
printf("%S%S -14 ",P1,P2);
return 0;
}
d)
main()
{
int m =0;
do
{
if(m>10)
break;
m=m+10;
printf("%d",m);
} while(m<50);
printf("%d",m);
}
Q6) Answer the following (any two):
a) Explain storage classes in C.
b) Explain switch statement with suitable example.
c) Trace the output:
i)
main()
{
int j=1;
for(;j<5;)
printf("%d",j)
j++;
}
ii)
main()
{
int i = 1;
switch(i)
{
printf("Hello");
case 1:
printf("Hi");
break;
case 2:
printf("bye");
break;
}
getch();
}
0 Comments