You are on page 1of 10

XYZ COLLEGE NAME

BHOPAL

DEPARTMENT OF

LAB MANUAL

Program : Master of Computer Application

Semester : First Semester

Course Code : MCA 103

Subject Name : Programming and problem solving in C

Prepared By: Approved By:

(HOD)
(Lecturer)
Xyz College name

BHOPAL

DEPARTMENT OF MCA

LAB MANUAL

Program : Master of Computer Application

Semester : First Semester

Course Code : MCA 103

Subject Name : programming and problem solving in C

Approved By:
Prepared By:

XYZ
XYZ (Lecturer) (HOD)
CONTENTS

1. SYLLABUS

2. LIST OF BOOKS

3. TIME TABLE

4. PRACTICAL LIST

5. VIVA QUESSTION

6. ATTENDANCE SHEET

7. GRADING SHEET

8. LAB MANUAL
SYLLABUS

Course Course Name L T P Theory Sessional Practical Total


No. Hrs Hrs Hrs Marks Marks Marks Marks
Max Min Max Min Max Min
MCA- Programming and 3 1 - 100 40 50 30 - - 150
103 Problem Solving in C

UNIT-I
An overview: Problem identification, analysis, design, coding, testing & debugging,
implementation, modification & maintenance; algorithms & flowcharts; Characteristics of a good
program - accuracy, simplicity, robustness, portability, minimum resource & time requirement,
modularization; Rules/ conventions of coding, documentation, naming variables; Top down design;
Bottom-up design.

UNIT-II
Fundamentals of C Programming: History of C; Structure of a C Program; Data types; Constant &
Variable, naming variables; Operators & expressions; Control Constructs if-else, for, while, do-
while; Case switch statement; Arrays; Formatted & unformatted I/O; Type modifiers & storage
classes; Ternary operator; Type conversion & type casting; Priority & associativity of operators.

UNIT-III
Modular Programming: Functions; Arguments; Return value; Parameter passing call by value, call
by
reference; Return statement; Scope, visibility and life-time rules for various types of variable,
static variable; Calling a function; Recursion basics, comparison with iteration, types of recursion-
direct, indirect, tree and tail recursion, when to avoid recursion, examples.

UNIT-IV
Advanced Programming Techniques: Special constructs Break, continue, exit(), goto & labels;
Pointers - & and * operators, pointer expression, pointer arithmetic, dynamic memory management
functions like malloc(), calloc(), free(); String; Pointer v/s array; Pointer to pointer; Array of
pointer & its limitation; Function returning pointers; Pointer to function, Function as parameter;
Structure basic, declaration, membership operator, pointer to structure, referential operator, self
referential structures, structure within structure, array in structure, array of structures; Union
basic, declaration; Enumerated data type; Typedef; command line arguments.

UNIT-V
Miscellaneous Features: File handling and related functions; printf & scanf family;C preprocessor
basics, #Include, #define, #undef, conditional compilation directive like #if, #else, #elif, #endif,
#ifdef and #ifndef; Variable argument list functions.
LIST OF BOOKS

SR.NO. AUTHOR TITLE PUBLISHER


1 Gottfried Problem Solving in C Schaum Series
2 Kanetkar Pointer In C BPB
3 Kanetkar Let us C BPB
4 Schildt C: The Complete reference 4th ed TMH
5 Kerninghan & Ritchie The C programming language PHI
XYZ COLLEGE, BHOPAL
DEPARTMENT OF MCA
LAB ASSIGNMENTS NO 1,2
Branch/Semester: MCA-I Session: July-December,2008
Subject: Programming & Problem Solving in C Subject Code: MCA 106
Name : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Roll No._ _ _ _ _ _ _ _ _ _
S. Topics Questions Remark Signatur
No. e

1. 1.Input/ To calculate simple interest.


2. output To print the table of given number.
3. statement To program of Prime number.
4. s To print Fibonacci series.
5. To find LCM of 2 numbers.
6. 2. Control To find the sum of 2 matrix.
7. statement To convert lower case to upper case.
8. s To print number in reverse order.
9. To generate the following series
S= 1+ x/ 1! + x2 / 2! -------xn/n!
10. To check whether number is Armstrong.
To convert binary number into decimal number.
To use switch case statement into two number and
then program following function :
1. Addition 2. Substration 3. Division 4.
Multiplication
1. 1. Array To calculate factorial using function.
2. To fall a string using function.
3. 2. To sort 10 numbers using array & function
4. Functions To find the sum of two matrix using function.
5. call by To print greatest and smallest number in array.
value To print this pyramid using function.
6. 1
3. 212
Recursion 32123
To sum of even number between 1 to 100.
7. To swap two values using call by reference.
8. To calculate sum of series using recursion.
9. To perform the matrix multiplication.
10. To convert square matrix into unit matrix.
To perform transpose of given square matrix.
To perform row sum and column sum of matrix.
To perform one function is called by another
function.
XYZ COLLEGE, BHOPAL
DEPARTMENT OF MCA
LAB ASSIGNMENTS NO - 3
Branch/Semester: MCA-I Session: July-December,xyz
Subject: Programming & Problem Solving in C Subject Code: MCA 106
Name : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Roll No._ _ _ _ _ _ _ _ _ _

S. Topics Questions Remark Signatur


No e
.
1. Break; Write a Program to demonstrate the use of break,
Continue; continue and goto label .
Goto;
2. Pointer Write a program using pointer to read a one
Structure dimensional array with 10 numbers and display
Union them.
3.
Write a program to read a line of lower case text
character by keyboard and store it in char array
.Now convert this line of text into upper case letters.
4.
Write a program to sort the array of strings. &
Write a program to calculate the length of string
without using strlen function.
5.
Write a program to copy the contents of one string
into another without using library function.
6.
Use structure to store data about 10 books . In your
program data about book entails book title ,price
and number of copies of the book after reading the
data about books ,your program should display the
data of all the books which cost more than rs 200.
7.
Write a C program that reads several different
records. Each record is a collection of roll number
and marks. Your program should rearrange in the
descending order of marks and hence show the merit
8. list.

Write a program using pointers to read an array of


9. integer and print its element in reverse order of
index.

10 To compute the sum and multiplication of two


. complex numbers (by passing a structure to a
function).

Write a program to find the number of times that a


given word(i.e. a short string) occurs in a sentence
(i.e. a long string!). Read data from standard input.
The first line is a single word, which is followed by
general text on the second line. Read both up to a
newline character, and insert a terminating null
before processing.
Typical output should be:
The word is "the".
The sentence is "the cat sat on the mat".
The word occurs 2 times.
XYZ COLLEGE, BHOPAL
DEPARTMENT OF MCA
LAB ASSIGNMENTS NO - 3

Branch/Semester: MCA-I Session: July-December,2008


Subject: Programming & Problem Solving in C Subject Code: MCA 106
Name : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Roll No._ _ _ _ _ _ _ _ _ _

S. Topics Questions Remark Signatur


No e
.
1. Break; Write a Program to demonstrate the use of
Continue; break, continue and goto label .
Goto;
2. Pointer Write a program using pointer to read a one
Structure dimensional array with 10 numbers and
Union display them.
3.
Write a program to read a line of lower case
text character by keyboard and store it in
char array .Now convert this line of text into
4. upper case letters.

Write a program to sort the array of strings. &


Write a program to calculate the length of
5. string without using strlen function.

Write a program to copy the contents of one


6. string into another without using library
function.

Use structure to store data about 10 books . In


your program data about book entails book
title ,price and number of copies of the book
7. after reading the data about books ,your
program should display the data of all the
books which cost more than rs 200.

Write a C program that reads several different


8. records. Each record is a collection of roll
number and marks. Your program should
rearrange in the descending order of marks
9. and hence show the merit list.

Write a program using pointers to read an


10 array of integer and print its element in
. reverse order of index.
To compute the sum and multiplication of two
complex numbers (by passing a structure to a
function).

Write a program to find the number of times


that a given word(i.e. a short string) occurs in
a sentence (i.e. a long string!). Read data from
standard input. The first line is a single word,
which is followed by general text on the
second line. Read both up to a newline
character, and insert a terminating null before
processing.
Typical output should be:
The word is "the".
The sentence is "the cat sat on the mat".
The word occurs 2 times.

You might also like