Friday, 23 October 2026

Assignment 2 – Final Submission

Students who complete the online C program submission using the GDB compiler by tomorrow’s deadline must write the program they executed and include the output they observed. Please keep screenshots of both the program and its output with you.

Complete the written work in the same assignment book you used for Assignment 1. If you submitted only part of the program online, write only that part. If you did not submit the program online, you do not need to submit a written copy of Assignment 2. Deadline to submit the written assignment may be announced next week.

Online assignment status

 All students are hereby informed that tomorrow before 2:00 p.m. is the deadline to submit the assignment online through the GDB compiler. Failure to submit it by the deadline will result in the loss of your CTA marks. Class room invitation:  https://onlinegdb.com/classroom/invite/xKMPtFxJ8 . Few students have not joined the class room, they will loose CTA marks.



IA 1 Marks of C Programming subject

A few students scored less than 8 marks. They have been informed to complete an additional assignment by writing the answers to the IA questions. Please keep your completed assignment with you; I will collect it from you. As I am unwell, I have been unable to take your classes.

IA 1 Marks


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.

Assignment 2 – Final Submission

Students who complete the online C program submission using the GDB compiler by tomorrow’s deadline must write the program...