L LL

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Faculty of Engineering

Savitribai Phule Pune University

Savitribai Phule Pune University


First Year Engineering (2015 Course)
110003: Fundamentals of Programming Languages-I
(Revised version with effect from Academic Year 2016-17)

Credit: 02
Teaching Scheme:
Theory:
01 hr/week
Practical: 02 hrs/week

Examination Scheme:
Online: 50 marks

Prerequisites: Analytical and Logical skills


Course Objectives:
To acquire the fundamental principles, concepts and constructs of computer programming
To develop competency for the design, coding and debugging
To build the programming skills using 'C' to solve real world problems
Course Outcomes:
On completion of the course, learner will be able to

Use modular programming approach in diversified problem domains


Apply programming logic to solve real world problems
Decide effectiveness of computer based solutions
Course Contents

Unit I

(02 Hrs)

Introduction to Computer, Block diagram of Computer, hardware, software. Introduction to


System Software- Operating System, Editor, Complier, Assembler, Linker, Loader. Problem
solving using computers, Introduction to computer programming, Introduction to program planning
tools- algorithm, flowcharts, pseudo codes, Software Development Life Cycle, Introduction to
open source operating systems and programming languages, Introduction to program development
environments: BOSS and GCC.
Unit II

(03 Hrs)

Programming language 'C': Types of programming languages-machine-level, assembly, highlevel languages. Features of C, basic concepts, structure of a C program, declarations, constants,
variables, data types, Operators and expressions, conditional expressions. Operators- assignment,
arithmetic, relational, logical, increment and decrement, precedence and associativity of operators,
type conversions, Input and Output functions- scanf and printf.
Unit III

(03 Hrs)

Decision Control Structures in 'C': if, if-else, nested if-else, cascaded if-else and switch
statement, loop control structures: for, while, do-while loops, break and continue. Pointers in 'C':
Concept, address operators, pointer variable declaration, pointer assignment, pointer initialization,

Fundamentals of Programming Languages- I

1/5

Faculty of Engineering

Savitribai Phule Pune University

Unit IV

(04 Hrs)

Arrays in 'C': Concept, declaration, initialization, assessing elements, operations,


multidimensional array
Functions in 'C': definition, function call, call by value and call by reference, return statement,
standard library functions and user defined functions, passing array as function parameter.
Strings in 'C': Concept, declaration, initialization and string manipulation functions, library
functions.
Books:
Text:
1. Donald E. Knuth, The Art of Computer Programming, Vols. 1, Addison-Wesley, ISBN13: 978-0201485417, ISBN-10: 0201485419
2. T. E. Bailey, Program design with pseudo code, Brooks/Cole Publisher, ISBN-10:
0534055745, ISBN-13: 978-0534055745
3. Brian W. Kernighan, Dennis M. Ritchie, The C Programming Language, Prentice Hall,
ISBN 0131103628, Second Edition
Reference:
1. Lamey Robert, Logical problem solving, Prentice Hall, ISBN: 9780130618825
2. Herbert Schildt, C/C++ Programmer's Reference, McGraw-Hill, ISBN-13: 9780072127065, ISBN-10: 0072127066
3. Henry Mullish, Herbert L. Cooper, The Spirit of C, Thomson Learning, ISBN
0314285008
4. Carlo Ghezi, Mehdi Jazayeri, Programming Language Concepts, John Wiley and Sons,
ISBN- 0471104264, Third Edition
5. Subrata Saha and Subhodip M., Basic Computation and Programming with C, Cambridge
University of Press, India, ISBN:9781316601853
Guidelines for Instructor's Manual
The instructors manual is to be developed as a hands-on resource and reference. The instructor's
manual need to include prologue (about University/program/ institute/ department/foreword/
preface etc), University syllabus, conduction & Assessment guidelines, topics under considerationconcept, objectives, outcomes, set of typical applications/assignments/ guidelines, references etc.
The feedback seeking sheet for enhancement of instructor's manual may be added as annexure.
Guidelines for Student Journal
The laboratory assignments are to be submitted by student in the form of journal. Journal consists
of prologue, Certificate, table of contents, and write-up of each assignment (Title, Objectives,
Problem Statement, Outcomes, software & Hardware requirements, Date of Completion,
Assessment grade and assessor's sign, Theory- Concept, algorithm, flowchart, test cases,
conclusion/analysis, program code and exercises -MCQs, assignments, quizzes etc and references).
Guidelines for Assessment
Each assignment will be assigned grade based on parameters with appropriate weightage.
Suggested parameters include- timely completion, performance, innovation, punctuality and
neatness.

Fundamentals of Programming Languages- I

2/5

Faculty of Engineering

Savitribai Phule Pune University

Guidelines for Laboratory Conduction


The instructor is expected to frame the assignments by understanding the prerequisites,
technological aspects, utility and recent trends related to the topic. The assignment framing policy
need to address the average students and inclusive of an element to attract and promote the
intelligent students. The instructor may set multiple sets of assignments and distribute among
batches of students. It is appreciated if the assignments are based on real world
problems/applications. Encourage students for appropriate use of Hungarian notation, Indentation
and comments. Use of open source software is encouraged.
In addition to these, instructor may assign one real life application in the form of a mini-project
based on the concepts learned. Instructor may also set one assignment or mini-project that is
suitable to respective branch beyond the scope of syllabus.
Set of suggested assignment list is provided in 4 groups- A,B,C,D. Each student must perform at
least 8 assignments as study assignment, at least 3 from group A, 2 from group B, 1 from group
C, 1 from group D .
Suggested List of Laboratory Assignments
Study Assignment
Draw block diagram of typical computer system. Describe functions of each component. Study
computer available in your laboratory and write its configuration. Install Ubuntu. Define termsOperating System, Application Software, System Software, Compiler, Assembler, Linker, Loader,
Editor, Algorithm, Flowchart, Computer Programming, Programming Language and Software
Development Life Cycle.
Group A
1.
2.
3.

4.
5.
6.

Write a C program to compute the roots of given quadratic equation for non-zero
coefficients.
Write a C program to calculate the sum of all positive even numbers and the sum of all
negative odd numbers from the set of input numbers
A customer is offered 15% discount on the printed price of a laptop. The customer has to
pay 7% sales tax on the remaining amount. Write a program in C to calculate the amount
to be paid by the customer,
Write a C program to accept the length of three sides of a triangle and to test and print the
type of triangle as equilateral, isosceles or right angled or none
Write a C program to accept cost price and sales price of an item and calculate the profit
percentage or loss percentage.
Write a C program to find out if the number is a Pythagoras triplet. Ex a2=b2+c2

7.

Write a C program to implement Euclids algorithm to find the GCD and LCM of the
given two integers.
8. Write a C program to check whether input number is Prime or not.

Fundamentals of Programming Languages- I

3/5

Faculty of Engineering

Savitribai Phule Pune University

9. Write a C program to check if


(any one )
a) The number is perfect number or not. Hint: If sum of the factors (including 1 and
excluding the number itself) is same as that of original number then the number is said to
be perfect number.
b) The number is neon number or not. Hint: If the sum of the digits of square of the
number is the number itself, then the number is said to be neon. For example- 9, Square is
81 and 8+1=9.
c) The number is Armstrong number or not. Hint: If sum of cubes of digits is equal to
original number then the number is said to be Armstrong. For example- Number 153 is
Armstrong number (1)3+(5)3+(3)3=153
10. Write a C program to separate digits of input 4 digit integer, separate & display its digits.
11. Write a C program to generate first 20 Fibonacci numbers.
12. Write a C program to check if the entered 3 digit number is twisted prime or not.
Hint: If the number obtained after reversing the number is also a prime then the number is
twisted prime. Example 167, twisted 761, so 167 is twisted prime.
13. Write a C program to calculate the sum of all numbers from 1 to 100 that are divisible by 4
Group B
14. Write a C program to store the N data samples in an array and calculate mean, mode and
median
15. Write a C program to store N numbers in an array and display only those numbers that are
perfect squares
16. Write a C program to store N numbers in an array and search particular number
17. Write a C program to store N numbers in an array and display the square of each number
in the array
18. Write a C program to sort the roll numbers of present students. Mark the attendance of the
present students roll numbers randomly in an array.
19. Write a C program to store N numbers in an array and reverse the elements of the array
20. Write a C program to store Chemistry subject test marks of N students in an array and find
the Minimum and Maximum score. Test maximum marks= 20. Your program should accept
marks ranging between 0 to 20 only.
21. Write a C program to store N numbers in an array and compute the sum of all even and odd
numbers in an array.
Group C
22. Write a C program to accept a string and to display the following:
(a) Total number of characters in the string
(b) Total number of vowels in the string
(c) Total number of occurrence of particular character in the string
23. Write a C program to accept a string and change the case of each character of the string.
Example THIs Is a C Program changes to thiS iS A c pROGRAM
24. Write a C program to accept a string and print the string in alphabetical order. Example
COMPUTER will be CEMOPRTU

Fundamentals of Programming Languages- I

4/5

Faculty of Engineering

Savitribai Phule Pune University

25. Write a C program to accept a string with complete name of the employee and display the
string eliminating the middle word. Example Mayur Kumar Kulkarni would be displayed
as Mayur Kulkarni
26. Write a C program that will check whether given string is palindrome or not.
27. Write a C program that will check whether one string is substring of other string or not.
28. Write a C program to enter a string. Frame a word by joining all the first characters of the
words in the string. Example- input Just Allow Me will give output as JAM
29. Write a C program to accept a string and replace all the vowels in the string with *.
Group D
30. A class teacher wants to keep record of 10 students in the class along with the names and
marks obtained in 5 subjects. Write a C program with function that displaysa)
Name of the student with highest marks in a particular subject
b)
Overall percentage result of the class
c)
Total number of passing students in the class
d)
Total number of students failing in one subject
e)
Total number of distinctions in the class
30 Write a C program to carry out following operations on strings using library functionsa) To concatenate a string S2 to string S1
b) To find the length of a given string
c) To compare two strings S1 and S2
d) To copy a string S2 to another string S1
31 Write a C program to compute the factorial of the given positive integer using function
32 Write a C program with functions to compute addition and subtraction of two matrices
33 Write a C program that stores 12 city names in a single dimensional array. Write function
to display only those words that begin with a consonant and end with a vowel exampleBegaluru, Mumbai
34 A mall has 5 stores and 3 departments. Write a C program with function to find the
monthly sale of a particular store or department and the total monthly sale of each store
and each department.
35 Write a C program that declares and initializes a double, an int and a char variable and a
pointer to each of the three variables and one double pointer to store pointer address. Your
program should print the address of, and value stored in, and the memory size (in bytes) of
each of seven variables.
36

Write a C program with function to swap values of two elements ( call by reference)

Fundamentals of Programming Languages- I

5/5

Faculty of Engineering

Savitribai Phule Pune University

Savitribai Phule Pune University


First Year Engineering (2015 Course)
110010: Fundamentals of Programming Languages-II
(Revised version with effect from Academic Year 2016-17)
Credit: 02

Teaching Scheme:
Theory:

Examination Scheme:

01 hr/week

Online: 50 marks

Practical: 02 hrs/week
Prerequisites: - Fundamentals of Programming Languages-I
Course Objectives:
To develop competency for the logic, design, coding and debugging
To acquire fundamental knowledge of Object Oriented Programming
To get familiar with the fundamentals of World Wide Web and HTML
To get familiar with fundamentals of Embedded C programming
Course Outcomes:
On completion of the course, learner will be able to

Develop programs using object oriented concepts


Design and develop web pages using HTML
Design and develop mobile application using Android SDK
Design and develop simple application using Embedded Programming
Course Contents

Unit I

(03 Hrs)

Structure and Union in C: Introduction to structure and enumeration, declaration of structure,


initialization, declaration of structure variables and accessing members, declaration of union and
accessing members, array of structure, typedef.
Unit II

(04 Hrs)

Introduction to Object Oriented Programming: classes, objects, methods, abstraction, inheritance,


encapsulation, public, private and protected access specifier. Introduction to data structure,
Introduction to Abstract Data Type (ADT), Introduction to C++ as Object Oriented Programming
Language.
Unit III

(02 Hrs)

Introduction to Internet, World Wide Web & Search Engine, HTML: Basic structure of an HTML
document, creating an HTML document, Introduction to elements of HTML, working with text,
lists, hyperlinks and images.

Fundamentals of Programming Languages- II

1/5

Faculty of Engineering

Savitribai Phule Pune University

Unit IV

(03 Hrs)

Android: Overview of Android OS, Overview of Wireless Application Protocol (WAP),


Introduction to open handset alliance, Introduction to android platform differences, Introduction to
Android SDK.
Embedded C: Programming embedded systems in C, Case study of typical embedded system like
Intruder alarm system (exclude questions on case study for online examination)
Books:
Text:
1. Bjarne Stroustrup, The C++ Programming Language, Pearson Education, ISBN
8131705218, third Edition
2. HTML5: The Black Book, DT Editorial Services, Paraglyph Press, USA, ISBN13:
9789350040959 (Indian Edition by DreamTech Publishers)
3. Android Wireless Application Development, Shane Conder, Lauren Darcey, Pearson
Education, ISBN:0321813839
4. Michael Pont, Embedded C, Pearson Education, ISBN 0-201-79523-X, ISBN
8131715892
Reference:
1. Robert Lafore, Object-Oriented Programming in C++, Sams Publishing,
ISBN:0672323087 (ISBN 13: 9780672323089)
2. Walter Savitch, Problem Solving with C++, Addison Wesley- Pearson Education, ISBN
0201703904, third Edition
3. Wendy Willard, HTML: A Beginner's Guide, McGraw Hill, ISBN 0072263784, third
Edition
4. Chuck Hellebuyck, Beginner's Guide to Embedded C Programming, Electronics
Products, USA
5. Sumit Mittu, A Workbook on C++, Cengage Learning India, ISBN 10: 8131520668 /
ISBN 13: 9788131520666
Guidelines for Instructor's Manual
The instructors manual is to be developed as a hands-on resource and reference. The instructor's
manual need to include prologue (about University/program/ institute/ department/foreword/
preface etc), University syllabus, conduction & Assessment guidelines, topics under considerationconcept, objectives, outcomes, set of typical applications/assignments/ guidelines, references etc.
The feedback seeking sheet for enhancement of instructor's manual may be added as annexure.
Guidelines for Student Journal
The laboratory assignments are to be submitted by student in the form of journal. Journal consists
of prologue, Certificate, table of contents, and write-up of each assignment ( Title, Objectives,
Problem Statement, Outcomes, software & Hardware requirements, Date of Completion,
Assessment grade and assessor's sign, Theory- Concept, algorithm, flowchart, test cases,
conclusion/analysis, program code; exercises -MCQs, assignments, quizzes etc and references ).
Guidelines for Assessment
Each assignment will be assigned grade based on parameters with appropriate weightage.
Suggested parameters include- timely completion, performance, innovation, punctuality and
neatness.

Fundamentals of Programming Languages- II

2/5

Faculty of Engineering

Savitribai Phule Pune University

Guidelines for Laboratory Conduction


The instructor is expected to frame the assignments by understanding the prerequisites,
technological aspects, utility and recent trends related to the topic. The assignment framing policy
need to address the average students and inclusive of an element to attract and promote the
intelligent students. The instructor may set multiple sets of assignments and distribute among
batches of students. It is appreciated if the assignments are based on real world
problems/applications. Encourage students for appropriate use of Hungarian notation, Indentation
and comments. Use of open source software is encouraged.
In addition to these, instructor may assign one real life application in the form of a mini-project
based on the concepts learned. Instructor may also set one assignment or mini-project that is
suitable to respective branch beyond the scope of syllabus.
Set of suggested assignment list is provided in 4 groups- A,B,C,D. Each student must perform at
least 8 assignments as at least 3 from group A, 2 from group B, 1 from group C, 2 from group
D.
Suggested List of Laboratory Assignments
Sr.
Group A (Any 3 - one of which is based on use of Union)
No.
1. Write a program in C to define a structure for Customer bank account that holds
Information like Account Number, Name of account holder, balance, Internet banking
facility availed(Yes or No), Pin code ( 422001 to 422013) , Account type(saving,
recurring, deposit).
a) Read account details for N customers
b) Identify the golden, silver and general customers.
Golden customers: Balance> 10,00000
Silver Customers: Balance >500000 and <10,00000
General customers: Balance <500000
c) Display the list of customers availing the Internet banking facility
d) Display the customers belonging to a particular geographical location depending on
postal code
e) Display the customer list as per their account type.
2. Write a program in C to define a structure that holds Information of items like- Item
Number, Item Names, Item Category( Electronics, Food, Cosmetics etc), Available stock.
Display the available items.
3. Write a Menu driven program in C for a cricket players display board. The information of
the cricketer can be (not limited to) Name, Age, Country, Category ( Batsman, Bowler,
Wicket keeper, All rounder), Number of ODIs played, Number of International 20-20s
played, Average batting score, Total number of wickets taken, etc. (Optional- Use pointer
to structure to read and display information of a player.)
Perform following queriesa)
Number of batsman of a particular country
b)
Batsman with highest average score
c)
Number of bowlers of a particular country
d)
Bowler that has taken maximum no of wickets
e)
Show a particular players entire Display board information

Fundamentals of Programming Languages- II

3/5

Faculty of Engineering

Savitribai Phule Pune University

4. Write a program in C using structure for maintaining extracurricular activities of students


( roll, name, year, activity name, and prize). The prize can be either cash prize or memento
but not both. Cash prize is to be recorded as integer and memento is to be recorded as
character string. Use union within structure for prize. Read extracurricular activity record
for n students and Display extracurricular activities.
5. Write a program in C using structure for maintaining departmental library informationbook record (Accession number, title, edition, author and tag. The tag can be either
purchase cost or name of the donor. Use union within structure for tag. Display list of
purchased and donated books separately.
Group B
6. Write a C++ program to define a class to represent a Matrix. Write constructor to initialize
all matrix values to 0. Include member functions to perform the following tasks:

To read the Matrix


To display the Matrix
To add two matrix.
Subtract one matrix from other
Matrix Multiplication

7. The customers of the Maharashtra State Electricity Board are charged depending on the
number of units consumed. The electricity tariff is calculated as follows
Units Consumed
Up to 100 units

Charges
90 Paise per unit

More than 100 and up to 200 Units Rs. 1 per unit


More than 200 units

Rs. 1.30 per unit

In addition to above every person has to pay Rs75 as service charge per month. Write a
program in C++ using control structures to calculate the Electricity bill.
8. Diwali festival discounts are announced by a showroom. Based on the total cost of the
purchase, the following discounts are offered
Total Cost

Discount

Less than Rs. 1000

5%

More than Rs1000 and upto Rs2000

15%

Rs 2000 to Rs 5000

20%

Above Rs 5000

35%

Above Rs 10000

50%

Write a program in C++ to compute and display the amount to be paid by the customer
after availing the discounts. The total cost can be taken as input.

Fundamentals of Programming Languages- II

4/5

Faculty of Engineering

Savitribai Phule Pune University

9. XYZ transport company charges the parcels from Nashik to Pune and vice versa as per
the given tariff
Total Cost

Discount

Up to 15kg

Rs. 20 per kg

For next 20 kg

Rs. 10 per kg

For next 20 kg

Rs. 8 per kg

More than that

Rs. 5 per kg

Taking the weight of the parcel as input, Write a program in C++ to calculate the charges.
Group C
10. Design webpage for personal information (personal information, photo, qualification,
experience, etc) using images, tables and hyperlinks
11. Design web page for promoting city as a tourist destination using images, tables,
hyperlinks etc.
12. Design web page for builder to showcase the various projects with various specifications
using images, tables, hyperlinks etc.
Group D (Any 2- one each for Embedded C and Android)
13. A pizza parlor accepts maximum N orders. A total current order is displayed using
LED/LCD display connected to PC. Write a embedded C program to increment or
decrement count based on order placed or order served.
14. An USB light is used to work in dark for keyboard attached to your PC/Laptop. Write a
embedded C program to switch off the light after 10 minutes of keyboard inactivity
15. Write an embedded C program to rotate stepper motor in clock wise or anti-clock wise
direction by providing the angle of rotation.
16. Write an embedded C program to generate rolling display of your institutes name using
LED/LCD display connected to PC.
17. Installation of Android SDK for Eclipse and Write a program to read user name and
display the message with user name such as Welcome dear XYZ to the world of Android
18. Write a program to implement simple calculator using Android programming
19. Write a program to develop mobile app using Android programming for collecting opinion
showing numerical calculator for particular issue such as whether Net neutrality should
be permitted or not

Fundamentals of Programming Languages- II

5/5

You might also like