Skip to content

A collection of C programming practice codes, exercises, and problem-solving examples for beginners.

Notifications You must be signed in to change notification settings

adnansami68/C--Programming

Repository files navigation

💻 Computer Programming Laboratory Solutions

This repository contains my personal solutions and task implementations for the Computer Programming Laboratory course assignments of Eastern University.

📚 Course Information

Parameter Detail
University Eastern University
Course Code 06131204
Course Title Computer Programming Laboratory
Topic Structured Programming (C Language)

📝 Lab Task List

✅ Lab 01: Introduction to C Programming Environment

  • Print "Hello World".
  • Print Student ID.
  • Declare variables and take input using scanf().
  • Display output using printf().

✅ Lab 02: Arithmetic & Logical Operators

  • Calculate the average and sum of 3 numbers.
  • Expression Simplification (e.g., 3+4*2/6*(5-3)%3).
  • Demonstrate Pre-increment (++i) vs Post-increment (i++).

✅ Lab 03: Decision Making (Conditionals)

  • Find the smaller of two numbers.
  • Check if a number is Even or Odd.
  • Leap Year Checker.
  • Positive or Negative Number Checker.

✅ Lab 04: Loop Structures

  • Calculate the sum of a series.
  • Print numbers from 1 to 10.
  • Extract and print digits from Student ID.

✅ Lab 05: Nested Loops

  • Print Multiplication Table.
  • Find Prime Numbers in a range.
  • Calculate Sum of Factors / Perfect Numbers.

✅ Lab 06: Pattern Printing

  • Right-Angle Triangle.
  • Rectangle/Square Pattern.
  • Pyramid Pattern.

✅ Lab 07: 1D Array Operations

  • Array declaration and initialization.
  • Calculate Sum, Average, Maximum, and Minimum of an array.

✅ Lab 08: 2D Array Operations

  • Nested array initialization.
  • Calculate Sum of specific rows and columns.

✅ Lab 09: String Manipulation

  • String declaration and standard functions (strcpy, strlen, strcmp).
  • Count vowels and consonants.
  • Reverse a string.

✅ Lab 10: Functions

  • User-defined function declaration and calling.
  • Function to add fractional numbers.
  • Area of a triangle using a function.

⚙️ How to Run

  1. Clone this repository to your local machine.
  2. Open the folder in your C IDE or Terminal.
  3. Compile the adnan.c file:
    g++ adnan.c -orun
  4. Run the application:
    ./run

👨‍💻 Solved By

Md. Adnan Sami
Student, Dept. of CSE
🌐 Portfolio: Visit My Portfolio Website
💻 GitHub: Visit My GitHub Profile

About

A collection of C programming practice codes, exercises, and problem-solving examples for beginners.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages