0% found this document useful (0 votes)
42 views3 pages

Programming Fundamentals Using C/C++: (3 Lectures)

The document outlines the core courses for an honours degree in computer science. It details 11 topics that make up the programming fundamentals course, including data types, operators, conditional statements, functions, arrays, pointers, classes, inheritance and exception handling. It also lists 20 programming problems that students must complete as part of the associated lab course.
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)
42 views3 pages

Programming Fundamentals Using C/C++: (3 Lectures)

The document outlines the core courses for an honours degree in computer science. It details 11 topics that make up the programming fundamentals course, including data types, operators, conditional statements, functions, arrays, pointers, classes, inheritance and exception handling. It also lists 20 programming problems that students must complete as part of the associated lab course.
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/ 3

CORE COURSES (HONOURS IN COMPUTER SCIENCE)

CMSACOR01T: Programming Fundamentals using C/C++ Theory: 60 Lectures

1. Introduction to C and C++ (3 Lectures)

History of C and C++, Overview of Procedural Programming and Object-Orientation Programming,


Using main() function, Compiling and Executing Simple Programs in C++.

2. Data Types, Variables, Constants, Operators and Basic I/O (5 Lectures)

Declaring, Defining and Initializing Variables, Scope of Variables, Using Named Constants,
Keywords, Data Types, Casting of Data Types, Operators (Arithmetic, Logical and Bitwise),
Using Comments in programs, Character I/O (getc, getchar, putc, putcharetc), Formatted and
Console I/O (printf(), scanf(), cin, cout), Using Basic Header Files (stdio.h, iostream.h,
conio.hetc).

3. Expressions, Conditional Statements and Iterative Statements (5 Lectures)

Simple Expressions in C++ (including Unary Operator Expressions, Binary Operator


Expressions), Understanding Operators Precedence in Expressions, Conditional Statements (if
construct, switch-case construct), Understanding syntax and utility of Iterative Statements
(while, do-while, and for loops), Use of break and continue in Loops, Using Nested Statements
(Conditional as well as Iterative)

4. Functions and Arrays (10 Lectures)

Utility of functions, Call by Value, Call by Reference, Functions returning value, Void
functions, Inline Functions, Return data type of functions, Functions parameters, Differentiating
between Declaration and Definition of Functions, Command Line Arguments/Parameters in
Functions, Functions with variable number of Arguments. Creating and Using One Dimensional
Arrays ( Declaring and Defining an Array, Initializing an Array, Accessing individual elements
in an Array, Manipulating array elements using loops), Use Various types of arrays (integer,
float and character arrays / Strings) Two-dimensional Arrays (Declaring, Defining and
Initializing Two Dimensional Array, Working with Rows and Columns), Introduction to Multi-
dimensional arrays

5. Derived Data Types (Structures and Unions) (3 Lectures)

Understanding utility of structures and unions, Declaring, initializing and using simple structures
and unions, Manipulating individual members of structures and unions, Array of Structures,
Individual data members as structures, Passing and returning structures from functions, Structure
with union as members, Union with structures as members.

6. Pointers and References in C++ (7 Lectures)

Understanding a Pointer Variable, Simple use of Pointers (Declaring and Dereferencing


Pointers to simple variables), Pointers to Pointers, Pointers to structures, Problems with
Pointers, Passing pointers as function arguments, Returning a pointer from a function, using
arrays as pointers, Passing arrays to functions. Pointers vs. References, Declaring and
initializing references, Using references as function arguments and function return values

7. Memory Allocation in C++ (3 Lectures)


Differentiating between static and dynamic memory allocation, use of malloc, calloc and free
functions, use of new and delete operators, storage of variables in static and dynamic memory
allocation

8. File I/O, Preprocessor Directives (4 Lectures)

Opening and closing a file (use of fstream header file, ifstream, ofstream and fstream classes),
Reading and writing Text Files, Using put(), get(), read() and write() functions, Random
access in files, Understanding the Preprocessor Directives (#include, #define, #error, #if, #else,
#elif, #endif, #ifdef, #ifndef and #undef), Macros

9. Using Classes in C++ (7 Lectures)

Principles of Object-Oriented Programming, Defining & Using Classes, Class Constructors,


Constructor Overloading, Function overloading in classes, Class Variables &Functions, Objects
as parameters, Specifying the Protected and Private Access, Copy Constructors, Overview of
Template classes and their use.

10. Overview of Function Overloading and Operator Overloading (5 Lectures)

Need of Overloading functions and operators, Overloading functions by number and type of
arguments, Looking at an operator as a function call, Overloading Operators (including
assignment operators, unary operators)

11. Inheritance, Polymorphism and Exception Handling (8 Lectures)

Introduction to Inheritance (Multi-Level Inheritance, Multiple Inheritance), Polymorphism


(Virtual Functions, Pure Virtual Functions), Basics Exceptional Handling (using catch and
throw, multiple catch statements), Catching all exceptions, Restricting exceptions, Rethrowing
exceptions.

Reference Books

1. HerbtzSchildt, "C++: The Complete Reference", Fourth Edition, McGraw Hill.2003


th
2. BjarneStroustrup, "The C++ Programming Language", 4 Edition, Addison-Wesley,
2013.
3. BjarneStroustroup, "Programming -- Principles and Practice using C++", 2nd Edition,
Addison-Wesley 2014.
4. E Balaguruswamy, "Object Oriented Programming with C++", Tata McGraw-Hill
Education, 2008.
5. Paul Deitel, Harvey Deitel, "C++ How to Program", 8th Edition, Prentice Hall, 2011.
6. John R. Hubbard, "Programming with C++", Schaum's Series, 2nd Edition, 2000.
7. Andrew Koeni, Barbara, E. Moo, "Accelerated C++", Published by Addison-Wesley,
2000.
8. Scott Meyers, "Effective C++", 3rd Edition, Published by Addison-Wesley, 2005.
9. Harry, H. Chaudhary, "Head First C++ Programming: The Definitive Beginner's Guide",
First Create space Inc, O-D Publishing, LLC USA.2014
10. Walter Savitch, "Problem Solving with C++", Pearson Education, 2007.
11. Stanley B. Lippman, JoseeLajoie, Barbara E. Moo, "C++ Primer", Published by
Addison-Wesley, 5th Edition, 2012
CMSACOR01P: Programming Fundamentals using C/C++ Lab Practical: 60 Lectures
1. WAP to print the sum and product of digits of an integer.
2. WAP to reverse a number.
3. WAP to compute the sum of the first n terms of the following series

4. WAP to compute the sum of the first n terms of the following series
S =1-2+3-
5. Write a function that checks whether a given string is Palindrome or not. Use this
function to find whether the string entered by user is Palindrome or not.
6. Write a function to find whether a given no. is prime or not. Use the same to generate
the prime numbers less than 100.
7. WAP to compute the factors of a given number.
8. Write a macro that swaps two numbers. WAP to use it.
9. WAP to print a triangle of stars as follows (take number of lines from user):
*
***
*****
*******
*********
10. WAP to perform following actions on an array entered by the user:
i.Print the even-valued elements
ii.Print the odd-valued elements
iii.Calculate and print the sum and average of the elements of array
iv.Print the maximum and minimum element of array
v.Remove the duplicates from the array
vi.Print the array in reverse order
The program should present a menu to the user and ask for one of the options.
The menu should also include options to re-enter array and to quit the program.
11. WAP that prints a table indicating the number of occurrences of each alphabet in the
text entered as command line arguments.
12. Write a program that swaps two numbers using pointers.
13. Write a program in which a function is passed address of two variables and then alter its
contents.
14. Write a program which takes the radius of a circle as input from the user, passes it to another
function that computes the area and the circumference of the circle and displays the value of
area and circumference from the main() function.
15. Write a program to find sum of n elements entered by the user. To write this program,
allocate memory dynamically using malloc() / calloc() functions or new operator.
16. Write a menu driven program to perform following operations on strings:
a) Show address of each character in string
b) Concatenate two strings without using strcat function.
c) Concatenate two strings using strcat function.
d) Compare two strings
e) Calculate length of the string (use pointers)
f) Convert all lowercase characters to uppercase
g) Convert all uppercase characters to lowercase
h) Calculate number of vowels
i) Reverse the string
17. Given two ordered arrays of integers, write a program to merge the two-arrays to get
an ordered array.
18. WAP to display Fibonacci series (i)using recursion, (ii) using iteration
19. WAP to calculate Factorial of a number (i)using recursion, (ii) using iteration
20. WAP to calculate GCD of two numbers (i) with recursion (ii) without recursion.

You might also like