<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security Course / Subject Code : DI01000131 Course / Subject Name : Computer Programming Fundamentals

| w. e. f. Academic Year:   | 2024-2025   |
|---------------------------|-------------|
| Semester:                 | 1 st        |
| Category of the Course:   | PCC         |

| Prerequisite:   | ---                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Rationale:      | In  today's  digital  era,  digitization  and  automation  connect  gadgets,  home  appliances,  and  even  the  human  body.  The  key  to  these  connections  is  programming. Students need to learn the basics of computer  programming. This  introductory  Computer  Programming  Course  focuses  on  developing  logical  thinking and programming skills using the C language. These skills can be applied  to scientific, research, and business purposes. |

## Course Outcome:

After Completion of the Course, Student will able to:

| No                                                                          | Course Outcomes   | RBT Level   |
|-----------------------------------------------------------------------------|-------------------|-------------|
| Write Simple C programs to input and output data in the prescribed formats. | Understand        | 01          |
| Create C programs using control structures.                                 | Apply             | 02          |
| Design C programs using arrays and pointers.                                | Apply             | 03          |
| Implement user-defined functions.                                           | Apply             | 04          |
| 05  Execute file and I/O operations in C.                                   | Apply             |             |

*Revised Bloom's Taxonomy (RBT)

Teaching and Examination Scheme:

| Teaching Scheme  (in Hours)   | Teaching Scheme  (in Hours)   | Teaching Scheme  (in Hours)   | Total  Credits  L+T+  (PR/2)   | Assessment Pattern and Marks   | Assessment Pattern and Marks   | Assessment Pattern and Marks   | Assessment Pattern and Marks   | Total   |
|-------------------------------|-------------------------------|-------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|---------|
| L                             |                               |                               |                                | Theory                         | Theory                         | Tutorial / Practical           | Tutorial / Practical           | Marks   |
|                               | T                             | PR                            | C                              | ESE  (E)                       | PA / CA  (M)                   | PA/CA (I)                      | ESE  (V)                       |         |
| 3                             | 0                             | 2                             | 4                              | 70                             | 30                             | 20                             | 30                             | 150     |

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security Course / Subject Code : DI01000131 Course / Subject Name : Computer Programming Fundamentals

## Course Content:

|   Unit  No. | Content                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |   No. of  Hours |   % of  Weightage |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------|
|           1 | Flowchart and Algorithm: Flowchart :   Definition,  Symbols  of  flowchart,  Advantages  and  Disadvantages  and Examples Algorithm:  Developing and writing algorithm using pseudo codes,  Advantages and Disadvantages and Examples  Overview of C:  History and importance of C, Basic structure of C  program, executing a C program  Constants, Variable and Data Types:  Introduction, Character Set,  C  Tokens,  Keywords  and  Identifiers,  Constants,  Variables,  Data  Types,  Declaration  of  Variables,  Assigning  Values  to  Variables,  Defining Symbolic Constants  Managing Input and Output Operations:   Reading  a  Character,  Writing  a  Character,  Formatted  Input,  Formatted  Output, Operators  and  Expressions:   Introduction,  Arithmetic  Operators,  Relational  Operators,  Logical  Operators,  Assignment  Operators,  Increment and Decrement Operators, Conditional Operator, Bitwise  Operators,  Special  Operators,  Arithmetic  Expressions,  Evaluation  Of  Expressions,  Precedence  of  Arithmetic  Operators,  Type  Conversions  in  Expressions,  Operator  Precedence  and  Associatively, Evaluation of Expressions. |              08 |                20 |
|           2 | Decision Making and Branching:   Introduction, Decision Making  with  IF  Statement,  Simple  IF  Statement,  The  IF-ELSE Statement,  Nesting of IF-ELSE Statements, The ELSE IF Ladder, The Switch  statement, The goto statement.   Decision  Making  and  Looping: Introduction,  The  while  Statement,  The  do  statement,  The    for  statement,  Break  and  continue statements  Program Solving practice on the above concepts                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |              10 |                22 |

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security Course / Subject Code : DI01000131 Course / Subject Name : Computer Programming Fundamentals

| 3.   | Arrays:  One-dimensional Arrays, Declaration of One-dimensional  Arrays, Initialization of One-dimensional Arrays, Two-dimensional  Arrays,  Declaration  of  Two-dimensional  Arrays,  Initialization  of  Two-dimensional Arrays  Pointer:  Introduction  to  Pointers,  Characteristics  of  Pointers,  Address  of  Operator  and  Indirection  operator,  Declaration  and  initialization of Pointers, Types of Pointers: void and null    Program Solving practice on the above concepts               |   08 |   20 |
|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------|
| 4.   | User-defined  Functions:   Need  for  functions,  Elements  of  User- defined Functions, Definition of Functions, Return Values and their  Types,  Function  Calls,  Function  Declaration,  Category  of  Functions, No Arguments and no Return Values, Arguments but no  Return values, Arguments with Return Values, No Arguments but  Returns  a  Value,  Passing  Arrays  to  Functions,  Recursion,  The  Scope, Visibility and Lifetime of variables.   Program Solving practice on the above concepts |   10 |   24 |
| 5    | Character Arrays and Strings:   Declaring  and  Initializing  String  Variables,  Reading  Strings  from  Terminal,  Writing  Strings  to  Screen, String-handling Functions, Command Line Arguments  Files:   Introduction  to  text  Files,  Opening  &  Closing  Files  in  text  mode, Reading From and writing into Files in text mode only  Program Solving practice on the above concepts                                                                                                              |   09 |   14 |
|      | Total                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |   45 |  100 |

## Suggested Specification Table with Marks (Theory):

## Distribution of Theory Marks (in %)

|   R Level |   U Level |   A Level |   N Level |   E Level |   C Level |
|-----------|-----------|-----------|-----------|-----------|-----------|
|        10 |        15 |        15 |         5 |        10 |        15 |

Where R: Remember; U: Understanding; A: Application, N: Analyze and E: Evaluate C: Create (as per Revised Bloom's Taxonomy)

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

## Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security

Course / Subject Code :

DI01000131

Course / Subject Name : Computer Programming Fundamentals

## References/Suggested Learning Resources:

## (a) Books:

1. Ashok  N.  Kamthane,  'Programming  with  ANSI  and  Turbo  C',  Pearson  Education,  Latest Edition
2. E.  Balagurusamy,  'Programming  in  ANSI  C',  McGraw  Hills  Education,  New  Delhi;  Latest Edition
3. Yashavant Kanetkar, 'Let us 'C'', BPB Publication, New Delhi; Latest Edition
4. Reema Thareja, 'Introduction to C Programming', Oxford University Press, New Delhi; Latest Edition

## (b) Open source software and website:

1. C Compiler for windows/linux
2. https://www.programiz.com/c-programming
3. Online DB : GDB online Debugger | Compiler - Code, Compile, Run, Debug online C, C++ (onlinegdb.com)
4. Compiler Explorer (Godbolt): Compiler Explorer (godbolt.org)
5. JDoodle:  JDoodle  -  Free  online  cloud  coding  platform  IDE  to  practice,  teach  and  learn programming
6. https://pll.harvard.edu/course/cs50-introduction-computer-science  ,  refer  part  Programming  in C
7. https://www.youtube.com/watch?v=ywg7cW0Txs4

## Suggested Course Practical List: (30 Hours)

1. Practice using scratch programming/snap programming.
2. Design and develop various problem statement using flowchart and Algorithm.
3. Design and test C programs using constants, variables, data types and different operators.
4. Design and test C programs to show formatted and unformatted input and output.
5. Design  and  test  at  least  one  C  programs  using  below  given  decision  making  statements:  (1) Simple if (2) if…else (3) Nested if (4) if…else ladder (5) switch (6) goto
6. Design and test C programs using the for, while and do. While loop.
7. Design and test a C program using break and continue statements.
8. Design and test C programs using one dimensional array and two dimensional arrays.
9. Design and test C programs using pointers.
10. Design and C programs using user defined Functions.
11. Design and test recursion function.
12. Design and test a C program to test various inbuilt string functions.
13. Design and test C programs using file operations.

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security Course / Subject Code : DI01000131 Course / Subject Name : Computer Programming Fundamentals

14. Design and test C programs using Command line arguments.

## List of Laboratory/Learning Resources Required:

1. Computer with basic configuration with windows or unix os
2. C Compilers

## Suggested Project List:

1. Develop a C program to represent a bank account. Create a structure Customer having fields name of the depositor, account number, type of account and balance amount in the account. Perform different operations:
- (1) To assign initial values
- (2) To deposit an amount
- (3) To withdraw an amount after checking the balance
- (4) To display name and balance. Write a menu driven program to handle N number of customers.
2. Develop  a  menu  driven  C  program  to  perform  basic  arithmetic  operations/mathematical operations like calculators on user inputted data.
3. Develop a C program to generate results for students. Admin enters component wise marks for each subject. After entering the marks, students will know his/her SPI as well as total backlogs.
4. Develop a C program to display a minimum number of currency notes required based on the entered amount. Output will also display the total number of notes required for each currency note.  Valid  currency  notes  are  1,  2,  5,  10,  20,  50,  100,  200,  500,  and  2000.  E.g.  if  the  user enters 140 then the output will be '3 currency notes are required. 1*100 + 2*20 = 140'.
5. Develop  a  C  program  that  allows  the  names  of  100  candidates  in  a  local  election  and  the number of votes received by each candidate. The program should then output each candidate's name,  the  number  of  votes  received,  and  the  percentage  of  the  total  votes  received  by  the candidate. Your program should also display the winner of the election.

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security Course / Subject Code : DI01000131 Course / Subject Name : Computer Programming Fundamentals

6. Develop  a  C  program  to  find  and  replace  all  occurrences  of  a  word  in  file.  For  example: Suppose file contains: 'I like programming. I am learning programming and programming with files is fun. Learning programming is simple and easy.'  Find occurrences of 'programming' and replace it with 'C language'.
7. Please refer some problem set of CS 50 course of Harvard and practice it.

## Suggested Activities for Students:

- a) Design algorithm and construct a flowchart for at least 6 problems
- b) Students are encouraged to learn Visual Language programming like scratch, snap etc.
- c) Undertake micro-projects in teams.
- d) Prepare charts to explain use/process of the identified topic.
- e) https://www.codechef.com/ , in this website very elementary programs are available, students are expected to solve those programs
- f) https://code.org/, an hour of coding event may be organized and students are encouraged to participate.
- g) Students are encouraged to register themselves in various MOOCs such as: Swayam, edx, Coursera, Udemy etc to further enhance their learning.
- h) Encourage students to participate in different coding competitions like Hackathon, online competitions on code chef etc.
- i) Encourage students to form a coding club at institute level.

* * * * * * *