1 Problem Solving With Computer

C Programming · Unit 1 · 2 hrs

Problem Solving with Computer

Exam-focused notes for Problem Solving with Computer (C Programming, CSC115): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.

What this unit covers

  • Problem analysis
  • Algorithms and Flowchart
  • Coding
  • Compilation and Execution
  • History of C
  • Structure of C program
  • Debugging, Testing and Documentation

Structure of C program

20815 marks

Explain the basic structure of C Programming. [5]

Every C program follows a standard, well-defined structure. Understanding this structure is essential before writing any C program. --- - Contains comments that describe the purpose of the program, author name, date, etc. - Comments are written between / an...

Full solved answer →
207410 marks

Discuss structure of a C program with suitable example.[10]

Every C program follows a standard, well-defined structure. Understanding this structure is essential because the compiler processes each section in a specific order. A well-structured C program is easier to read, debug, and maintain. --- A C program is typ...

Full solved answer →

History of C

20785 marks

Write short notes on: History of C, Bitwise operator. [5]

--- C is a general-purpose, structured programming language. The following points outline its historical development: - 1960 - ALGOL (Algorithmic Language) was developed. It introduced the concept of structured programming and served as the base for later l...

Full solved answer →

Algorithms and Flowchart

20775 marks

Explain flowchart with example. What are the benefits of using flowchart? What are the benefits of using flowchart? [3+2]

(a) Flowchart with Example A flowchart is a diagram that represents an algorithm using standard symbols connected by arrows. It shows the flow of control from start to end in a visual, step-by-step manner. Symbol Shape Purpose ------------------------ Termi...

Full solved answer →
20745 marks

What is algorithm? How is it different from flow chart? [2+3]

An algorithm is a finite, step-by-step set of instructions to solve a problem. It must be clear, unambiguous, and always terminate. Property Description ------ Finiteness Must end after a finite number of steps Definiteness Each step must be clear and unamb...

Full solved answer →

Compilation and Execution

20775 marks

Write short notes on: Compilation and execution, Operator precedence and associativity. [5]

--- A computer only understands machine language (binary). Source code written in C (a high-level language) must be converted before it can run. This conversion happens in the following stages: Stage Description ------------------------- Compilation The com...

Full solved answer →