I SEMESTER · SUBJECT GUIDE

C Programming.

Build your foundation. Think logically. Write better C.

04 Theory units52 Contact hours16 Lab exercises
YOUR FIRST STEP hello.c
#include <stdio.h>

int main(void) {
    puts("Hello, BCA!");
    return 0;
}
OUTPUTHello, BCA!

THE COURSE AT A GLANCE

A clear path from logic to programs.

24BCA12 · THEORY

Programming in C

4 credits · 4 teaching hours per week

52 contact hours · 3-hour examination

Internal assessment: 20 marks · Semester-end exam: 80 marks

24BCA11P · PRACTICAL

C Programming Lab

2 credits · 4 teaching hours per week

52 contact hours · 3-hour examination

Internal assessment: 10 marks · Semester-end exam: 40 marks

LEARN THE CORE CONCEPTS

Your four-unit study guide

Use these syllabus-aligned summaries to plan your study. All four units now have complete lessons, interactive demonstrations and C playgrounds. Units 3 and 4 include explicit definitions and written model answers; Unit 4 adds animated pointer and function diagrams.

01UNIT 01 / 14 HOURSC fundamentals

Algorithms and flowcharts; C history and features; program structure and execution; tokens, data types, variables, constants and headers.

Key idea

Start with the problem, write the algorithm, then translate it into a complete C program.

Practice: area of a circle, largest of three numbers and the sum of N numbers.

Study Unit 1 · lessons & C playground
02UNIT 02 / 14 HOURSI/O, operators & control flow

Formatted and unformatted I/O; operators and expressions; if and switch; while, do–while and for; nested loops and jump statements.

Key idea

Trace the condition, body and update separately. A do–while loop runs its body at least once.

Practice: input validation, number problems and loop tracing.

Study Unit 2 · I/O, operators & control flow
03UNIT 03 / 12 HOURSArrays, structures & unions

One- and two-dimensional arrays; declaration, initialization and memory representation; structures, member access and unions.

Key idea

Array indices begin at zero. Structure members have separate storage; union members share storage.

Practice: matrix operations and student records.

Study Unit 3 · arrays, structures & unions
04UNIT 04 / 12 HOURSPointers & functions

Pointer declaration, initialization and arithmetic; addresses and values; user-defined functions, categories and argument passing.

Key idea

C passes arguments by value. Passing an address lets a function modify the caller’s object through a pointer.

Practice: pointer-based swap and matrix operations using functions.

Study Unit 4 · pointers & functions

BEYOND THE FOUR THEORY UNITS

Further learning

Strings support the practical syllabus. The supplied notes also cover recursion, searching and sorting, file handling, dynamic memory, linked lists and the preprocessor.

These additional topics are kept separate from the prescribed four-unit theory structure.

TURN CONCEPTS INTO PRACTICE

C Programming lab

All 16 prescribed exercises now have complete solutions. Open any program for its algorithm, explained C code, sample run, extra test cases and viva answers.

A useful lab routine

Write the algorithm → implement the program → test normal and edge inputs → record the output.

Every prescribed exercise below now has its own worked solution, runnable compiler and downloadable C source.

REVISE WITH PURPOSE

Important questions

Practice prompts adapted from the supplied notes. These are study questions, not a prediction of the examination.

Explain & compare

  1. Explain the structure of a C program with an example.
  2. Compare while and do–while with suitable flow diagrams.
  3. Explain array memory representation and valid indices.
  4. Compare structures and unions, including storage and member access.

Write & trace

  1. Write an algorithm to find the largest of three numbers.
  2. Trace a loop and show how its variables change.
  3. Write a pointer-based swap and explain argument passing.
  4. Design a function to compute the trace of a square matrix.

Answer checklist: definition → syntax or diagram → explanation → worked example → output and limitations.

Ready to practise

Practice quizzes

Check your understanding with scored questions and explanations inside the complete lessons.

FURTHER STUDY

Topic index

The original five-group topic outline is retained below. These groups are a browsing index, separate from the four-unit course guide. Study the complete lessons for all four units, then practise with their C playgrounds and self-check quizzes.

View all C Programming topics

Unit 1 · C Fundamentals

  • Algorithms & Flowcharts
  • Structure of a C Program
  • Tokens, Keywords & Identifiers
  • Data Types, Variables & Constants

Unit 2 · Input, Output & Operators

  • printf(), scanf() & Escape Sequences
  • Arithmetic & Relational Operators
  • Logical, Assignment & Other Operators
  • Expressions & Operator Precedence

Unit 3 · Decision Making & Loops

  • if, if-else & Nested if
  • switch Statement
  • for, while & do-while Loops
  • break, continue & goto

Unit 4 · Arrays, Strings & Functions

  • One-Dimensional Arrays
  • Two-Dimensional Arrays
  • Strings & String Handling
  • Functions & Parameter Passing

Unit 5 · Pointers, Structures & Files

  • Pointers
  • Structures
  • Unions
  • File Handling