0% found this document useful (0 votes)
926 views

Mca 1 Sem Problem Solving Using C Kca102 2022

This document contains the questions and sections for a Problem Solving using C exam. It has 7 sections with multiple choice and long answer questions. Section 1 has 10 short answer questions worth 2 marks each on topics like compilers vs interpreters, arguments, logical expressions, arrays, structures, file I/O functions. Section 2 has 3 long answer 10-mark questions on algorithms, loops, functions. Section 3 has 1 long answer 10-mark question on flowcharts. Section 4 has 2 long answer 10-mark questions on switch-case and functions. Sections 5-7 each have 2 long answer 10-mark questions covering strings, storage classes, structures, unions, dynamic memory allocation, and graphics functions.

Uploaded by

kimog66911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
926 views

Mca 1 Sem Problem Solving Using C Kca102 2022

This document contains the questions and sections for a Problem Solving using C exam. It has 7 sections with multiple choice and long answer questions. Section 1 has 10 short answer questions worth 2 marks each on topics like compilers vs interpreters, arguments, logical expressions, arrays, structures, file I/O functions. Section 2 has 3 long answer 10-mark questions on algorithms, loops, functions. Section 3 has 1 long answer 10-mark question on flowcharts. Section 4 has 2 long answer 10-mark questions on switch-case and functions. Sections 5-7 each have 2 long answer 10-mark questions covering strings, storage classes, structures, unions, dynamic memory allocation, and graphics functions.

Uploaded by

kimog66911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Printed Page: 1 of 2

Subject Code: KCA102


0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

MCA
(SEM I) THEORY EXAMINATION 2021-22
PROBLEM SOLVING USING C

Time: 3 Hours Total Marks: 100


Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


Qno. Question Marks CO
a. Differentiate between compiler & interpreter. 2 1
b. How keywords are different from identifiers? 2 1
c. Differentiate between actual argument and formal argument. 2 2
d. Determine the value of the following logical expressions if a=5, b=10
2 2
i. a > b && a<b ii. a>b && a>b
e. What will be the output of the code?
void main()
{
int a,b *p; 2 3
a = 10; p=&a; b = *p+20;
printf(“%d”, b);
}
f. An array is declared as int a [100]; If the base address of the array is 5000,
2 3
what will be the address of a[59]. (Consider 16 bit machine architecture).
g. How a structure is different from union? 2 4
h. Differentiate between dot operator and -> operator to access structure objects. 2 4
i. Explain the statement fseek (fp, m, 1). 2 5
j. Illustrate the function feof(). 2 5
SECTION B

2. Attempt any three of the following: 3x10 =30


Qno. Question Marks CO
a. Define algorithm and explain the characteristics of Algorithm. Write an
10 1
algorithm to find the roots of a quadratic equation.
b. How entry-controlled loop is different from exit-controlled loop? Write a
program to print the pattern
1
2 3
10 2
4 5 6
7 8 9 10
c. What do you mean by function prototype? How call by value is different from
10 3
call by reference? Illustrate call by reference with a suitable example.
d. How a structure is different from an array? Write a C program to store
employee details such as Empid, Name, Salary and Age for 50 employees and 10 4
display the same for the users.
e. Develop a C program to copy the contents of one file to another file. The file
10 5
name must be pass through command line arguments.
SECTION C
3. Attempt any one part of the following: 1x10 =10

Qno. Question Marks CO


a. What is the use of flow charts? Explain the symbols used in a flowchart. Draw
10 1
a flowchart to find the maximum among three input numbers.
1|Page
Printed Page: 2 of 2
Subject Code: KCA102
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

MCA
(SEM I) THEORY EXAMINATION 2021-22
PROBLEM SOLVING USING C

b. What do you mean by operator precedence and associativity? Explain all bit-
10 1
wise operators with suitable example.

4. Attempt any one part of the following: 1x10 =10

Qno. Question Marks CO


a. Give the syntax and explain the working of switch-case statement. Write a
10 2
program to implement the menus based basic calculator using switch case
b. Identify the use of modular programming?Write a program by using user
10 2
define function to check given number is prime or not.

5. Attempt any one part of the following: 1x10 =10

Qno. Question Marks CO


a. Illustrate the different ways to input a string in C language. Write a program to
10 3
count the number of words and number of characters in an input string.
b. Define a pointer. How do you declare and initialize a pointer? Write a program
10 3
to add the contents of an integer array using pointer.

6. Attempt any one part of the following: 1x10 =10

Qno. Question Marks CO


a. Define scope and lifetime of a variable. Explain in detail about all storage
classes supported in C language with reference to scope and lifetime. 10 4

b. How a structure is different from union? Write a program to store 50 players’


details such as Player Name, Country Name and batting average. Using the
database Display the details of the players who are playing for a given country
10 4
.

7. Attempt any one part of the following: 1x10 =10

Qno. Question Marks CO


a. What are the drawbacks of static memory allocation? Explain the functions
10 5
available in C language to allocate memory dynamically.
b. Explain the following graphics functions supported by C language
10 5
i. initgraph() ii. rectangle() iii. outtextxy() iv. line() v. setbgcolor()

2|Page

You might also like