Thursday, September 12, 2019
COMPUTER PROGRAMMING
LAB
Pre-requisites : NIL
Course Educational Objective: In this course student will learn about
Software development tools like algorithm, Pseudo
codes and programming structure. Basic elements C programming structures like
data types, expressions, Control statements, various I/O functions and how to
solve simple mathematical Problems using control structures. Design and
implementation of various software components which solve real world problems.
Course
Outcomes: At the end of the course the student will be able
to
CO1: Apply and practice logical formulations to solve some simple problems
leading to specific applications.
CO2: Demonstrate C programming development environment, compiling,
debugging, linking and executing a program using the development environment.
CO3: Design effectively the required programming components that
efficiently solve computing problems in real world.
Mandatory: All Programs must have Algorithms and Flow Charts
LAB CYCLESSYLLABUS
I)
Exercise Programs on Basics of C-Program
Write a program in ‘C’ language to cover the following problems.
a) Example
program which shows the usage of various preliminary Data types available in C Language.
b) Example
program which shows the usage of various Operators available in C Language.
c) Example
programs to illustrate the order of evaluation.
II) Exercise Programs on Control Structures:
a) To
check whether the given year is leap year (or) not
b) Roots
of Quadratic Equation.
c) Finding
smallest& biggest number from the given set of 4 numbers using ‘if’
statement.
d) Calculate
the student grade in the examination – assume suitable Constraints.
e) Prepare
electricity bill for the consumed units – assume suitable Constraints.
f) Converting given two digit number into words
using switch statement
g) To
illustrate the usage of ‘goto’ statement.
III) Exercise Programs on Loops:
a) To
Display first N natural numbers
b) To
find whether the given number is Armstrong (or) not
c) To
find reverse of the given number and to check whether it is palindrome (or)
not.
d) To
find whether given number is strong number (or) not.
e) To
check whether given number is Prime (or) not
f) To
display prime numbers with in the given range (Nesting of Loops).
g) To
display the following structure (Nesting of Loops)
IV) Exercise Programs on Arrays& Strings:
Write example programs in C Language to perform
following operations:
a) Finding
the sum and average of given numbers using Arrays.
b) To
display elements of array in reverse order
c) To
search whether the given element is in the array (or) not using linear search
&binary search.
d) Write
a C program to perform the following operations
i)
Addition, subtraction and multiplication of Matrices
ii)
Transpose of given matrix
(The above operations are to be exercised using
functions also bypassing arguments)
e) Write
a C program to find whether the given string is palindrome (or) not.
f) To
accept line of text and find the number of characters, number of vowels and
number of blank spaces in it.
g) Write
an example program to illustrate the use of any 5 string handling functions.
V) Exercise Programs on Functions &Pointers:
a) Example
program to bring clarity on pointer declaration & initialization and Pointer arithmetic.
b) Write
an example program to describe the usage of call by reference.
c) Write
a program to find sum of the elements of the array using functions.
VI) Exercise
Programs on Functions:
Write example programs in C Language:
a) To
find factorial of a given number using functions.
b) Swap
two numbers using functions.
c) To
find GCD of two numbers using recursion
d) Write
a recursive function to solve Towers of Hanoi problem.
e) Write
an example program to illustrate use of external &static storage classes.
f) Write
an example program to illustrate the usage of command line arguments.
g) Program
to illustrate the usage of dynamic memory management functions.
VII) Exercise Programs on Derived data types:
a) Write
an example program using structures to process the student record. Assume
suitable fields for student structures (Different kinds of initialization of structure
variables are to be exercised)
b) Write
a program to read records of 10 employees and find their average salary
(Exercise
array of structures & Nested structures concepts through this program).
c) Write
a program to handle a structure variable
using pointers and implement self
referential structure(i.e. A structure variable having a pointer to itself)
VIII) Exercise Programs on Files:
Write an example
program on file to perform following operations:
a) Accessing
content from files and writing content in to it.
(Exercise different file operation
modes)
b) Copy
the contents of one file into another.
(Exercise different file operation
modes)
COMPUTER
PROGRAMMING Syllabus
L
|
T
|
P
|
Cr.
|
||||
B.Tech. (I Sem.)
|
17CI01 - COMPUTER PROGRAMMING
|
2
|
2
|
-
|
3
|
||
Pre-requisites :
NIL
Course Educational Objective: In this course student will
learn about
The basic elements of C programming structures
like data types, expressions, control statements, various I/O functions and how
to solve simple mathematical problems using control structures. The derived
data types like arrays, strings, various operations on them. Modular
programming using functions and Memory management using pointers. User defined
structures and various operations on it. The basics of files and its I/O
operations.
Course Outcomes: At the end of
the course, the student shall be able to:
CO1: Identify basic elements of C programming
structures like data types, expressions, control statements, various simple
functions and in view of using them in problem solving.
CO2: Apply various operations on derived data types
like arrays and strings in problem solving.
CO3: Design and Implement Modular Programming and
memory management using pointers.
CO4: Implement user defined data structures used in
specific applications.
CO5: Compare different file I/O operations on text
and binary files.
UNIT – I
Introduction to Problem solving through
C-Programming: Problem Specification.
Algorithm / pseudo code, flowchart, examples.
C-Programming:
Structure of C program, identifiers, basic data
types and sizes, Constants, variables, Input-output statements, A sample C
program, operators: arithmetic, relational and logical operators, increment and
decrement operators, conditional operator, bit-wise operators, assignment
operators, expressions, type conversions, conditional expressions, precedence
of operators and order of
evaluation.
Conditional
statements: if, if else, else if
ladder and switch statements, continue, goto. Loops: while, do-while and for
statements, break, programming examples.
UNIT – II
Arrays- one dimensional arrays-concept, declaration, definition, accessing
elements, storing elements, two dimensional and multi-dimensional arrays.
Character Strings: declaration, initialization, reading, writing strings, arithmetic operations
on characters, string handling functions, programming examples
UNIT – III
Functions: basics, category of functions, parameter passing techniques,
recursive functions-comparison with Iteration, Functions with arrays, storage
classes- extern, auto, and register, static, scope rules, Standard library
functions, dynamic memory management functions, command line arguments, programing
examples.
Pointers- concepts, declaring & initialization of pointer variables,
pointer expressions, pointer arithmetic, pointers and arrays, pointers and
character strings, pointer to pointer, Pre-processor Directives and
macros.
UNIT –IV
Derived types- structures- declaration, definition and initialization of
structures, accessing structures, nested structures, array of structures,
structures and functions, pointer to structure, self-referential structures,
unions, typedef, programming examples.
UNIT – V
Files – concept of a file, text files and binary files, streams, standard
I/O, Formatted I/O, file I/O operations, error handling, and programming
examples.
TEXT
BOOKS
REFERENCE
1. N.B.Venkateswarlu
and E.V.Prasad, C and Data Structures, S.Chand
Publishing,
1st Edition, 2010,
2. ReemaThareja,
Programming in C, Oxford University Press, 2nd Edition, 2015
3. Stephen
G.Kochan, Programming in C, Pearson Education, 3rd Edition, 2005
4. PradeepDey, Manas Ghosh, Programming in C,
Oxford University Press, 2nd Edition, 2011
5. E
Balagurusamy, Computer Programming, McGraw Hill Education, 1st
Edition
Subscribe to:
Posts (Atom)
ASE INTRODUCTION TO PROGRAMMING ASSIGNMENT MARKS Click the link for Marks
-
COMPUTER PROGRAMMING LAB (Common to All branches of Engineering) Course Objectives: The course aims to give students hands – on experience ...
-
1- IO STATEMENTS 2 - CONDITIONAL STATEMENTS 3 - LOOPING CONSTRUCTS 4 - FUNCTIONS 5 - 1D ARRAY 6 - 2-D ARRAY 7 - STRINGS 8 - POINTERS 9 - FUN...
-
Digital Logic Design Syllabus With Course Outcomes DLD COURSE HANDOUT 2018-19 TEXT BOOK Morris mano, Michael D Ciletti " Digit...