Friday, 9 October 2026

Assignment 2

                                       C PROGRAMMING – ASSIGNMENT 2

Online execution and submission deadline: 24/10/2026 before 2:00 PM

Written assignment deadline: 31/10/2026 before 5:00 PM

Submission Instructions

  1. Write and execute each C program using the online GDB Compiler.
  2. Take a clear screenshot of each program’s execution, including the program output. Write same program and output in your assignment book. Copy and Paste the screenshots of program and result into an MS Word file and keep with you.
  3. Write each C program and its result in the same assignment book used for Assignment 1 after executing programs and maintaining word file.
  4. When submitting the written assignment book, show the MS Word file containing your screenshots to the teacher.

Written assignment submission place: Staff Room

Note: Online GDB is the compiler, not the place to submit the written assignment book.

Rules and Regulations

  1. At the beginning of every program, display your full name and serial number.
  2. Include the date-and-time code provided in class in every program. When the program runs, it must display the system date and time. Record the program’s output, including the displayed date and time, in your assignment book. The code is time_t now = time(NULL); printf("Date and time: %s", ctime(&now));
  3. Wherever a question uses n, use your serial number as the value of n. For example, if your serial number is 18 (1+8=9), use n9 instead on n.
  4. Write and test each program yourself. Do not copy another student’s program or submit someone else’s work.
  5. Use meaningful variable names (with number), proper indentation, and suitable prompts and output messages. Add comments where they help explain your logic.
  6. Test each program and record its output neatly. Check that your name, serial number, and date and time are displayed correctly.
  7. Be prepared to run your programs and explain how they work. The teacher may ask you to make a small change or answer questions about your code.

                                                             List of Programs

 1.      Largest and Smallest: Write a C program to read n numbers and display the largest and smallest numbers.

2.      Largest Even and Largest Odd: Write a C program to read n integers and display the largest even number and the largest odd number. If the input contains no even or no odd numbers, display an appropriate message.

3.      Student Result and Grade: Write a C program to read marks from 0 to 100 and display the result according to the grade criteria given in Assignment 1. Also display an error message if the entered marks are outside the valid range.

4.      Numbers Divisible by 3 and 7: Write a C program to display the first n positive numbers divisible by both 3 and 7.

5.      Prime Number: Write a C program to read an integer and determine whether it is Prime.

6.      Frequency of a Number: Write a C program to read n integers and another integer x, then display how many times x occurs.

7.      Sum of Digits: Write a C program to read an integer and display the sum of its digits. Make sure your program also handles zero and negative input.

8.      Reverse and Palindrome: Write a C program to read an integer, reverse its digits, and determine whether the original number is a palindrome.

GDB online classroom: https://onlinegdb.com/classroom/invite/xKMPtFxJ8 

Wednesday, 7 October 2026

Assignment 1

 C PROGRAMMING – ASSIGNMENT 1

Algorithm Writing – Logic Building
Submission: Write the algorithms neatly in your Assignment Book.
Last Date: 07/10/2026
before 4:30 PM

Submission Place: Staff Room

Instructions

Instructions

For each problem:

  1. Write the Problem Statement.

  2. Write the Algorithm using clear, numbered steps.

  3. Do not write the C program at this stage.

  4. Write the algorithm in your own words and logic.

  5. Keep the same assignment book safely. The C program for these problems will be written in the same book later.


Assignment 1

1. Largest and Smallest

Write an algorithm to read n numbers from the user and find the largest and smallest numbers.

2. Largest Even and Largest Odd

Write an algorithm to read n numbers from the user and find the largest even number and the largest odd number.

3. Student Result and Grade

Write an algorithm to read the marks obtained in a subject and display the result according to the following criteria:

Marks

Grade / Result

90 and above

A

80 to 89

B

70 to 79

C

60 to 69

D

35 to 59

E

Below 35

F – Fail

Note: Assume that the marks are between 0 and 100.

4. Numbers Divisible by 3 and 7

Write an algorithm to generate and display the first n positive numbers that are divisible by both 3 and 7.

5. Fibonacci Series

Write an algorithm to generate and display the first n Fibonacci numbers.

6. Electricity Bill Calculation

Write an algorithm to calculate the electricity bill using two slab-wise rates.

Use the following slabs:

  • First 100 units → ₹5 per unit

  • Above 100 units → ₹7 per unit

The algorithm should read the number of units consumed and calculate the total bill.

Thursday, 3 September 2026

Syllabus Introduction to C programming 2026-27

26UESC144           Introduction to C Programming      (42-0-0-48) 3

                                                                    Total Hours: 90

Course Learning Objectives (CLOs): The course focuses on developing the problem solving skills that can be applied to problems in different areas which enable students to take-up subsequent IT related courses and professional career.

 Course Outcomes (COs):

Description of the Course Outcome:

At the end of the course the student will be able to:

Mapping to POs(1-11)

Substantial

Level(3)

Moderate

Level(2)

Slight

Level(1)

CO-1

Explain   the   basic   structure and Working principles of computer.

-

 

 

1

CO-2

Write    a    C    program            using C Programming constructs to solve given problems.

 

-

 

1,2,3

 

-

CO-3

Explain and apply the features of data structures like arrays to solve given problems.

 

-

 

1,2,3

 

-

CO-4

Explain the usage and the need for writing modular programs and in writing programs.

 

-

 

1,2,3

 

-

CO-5

Illustrate string manipulations, and various building blocks of data structures like structures, pointers in solving real-life problems.

 

-

 

1,2,3

 

-


POs

1

2

3

4

5

6

7

8

9

10

11

Mapping Level

1.8

2.0

2.0

-

-

 

-

-

-

-

-

 


Pre-requisites: NIL

Contents:

Unit-I

Introduction to C: Introduction to computers, input and output devices, Algorithms and Flow charts, Introduction to C, Structure of C program, Files used in a C program, Compilers, Compiling and executing C programs, variables, constants, Input/output       statements in C.            08 Hrs

 

 

Unit-II

Operators in C, Type conversion and typecasting. Decision control and Looping statements: Introduction to decision control, Conditional branching statements, iterative statements, nested loops, break and continue statements, go to statement. 08 Hrs

Unit-III

Arrays: Declaration of arrays, accessing the elements of an array, Operations on arrays, operations on two-dimensional arrays, introduction to multidimensional arrays.

Applications of arrays: case study with sorting and searching techniques: Bubble sort, Linear Search.                                        09Hrs                                                                        

 


Unit-IV

Functions: Introduction to user defined functions, Function definition, function declaration, function call, return statement, passing parameters to functions, recursive functions. 09 Hrs

 

Unit-V

Strings: String taxonomy, string operations

Pointers: Introduction to Pointers, Declaring Pointer Variables. Structures: Introduction to structures. 08 Hrs


Reference Books:

1)

E Balagurusamy, “Programming in ANSI C”, 6th Edition, Tata McGraw Hill, 2012.

2)

Reema Thareja, “Computer fundamentals and Programming in C”, Oxford University, 2/E, 2017.

3)

Brian W. Kernighan and Dennis M. Ritchie, The ‘C’ Programming Language, Prentice Hall of India.

 

 

 

 

 

 

 


Assignment 2

                                        C PROGRAMMING – ASSIGNMENT 2 Online execution and submission deadline: 24/10/2026 before 2:00 PM ...