This course covers the concepts of structured programming using C programming language.
CSC115Semester I3 credit hours11 units84 solved questions1,086 study cardsFull study modes
This course covers the concepts of structured programming using C programming language.
The free sample is open to everyone. Sign in for 2 free weeks of every answer, flashcards and progress.
This chapter traces how a problem becomes a working C program: analysing what is being asked, designing an algorithm and flowchart, writing and compiling the source code, and then debugging, testing and documenting it, before looking at where the C language itself came from and how a C program is structured.
Before any code is written, the problem itself must be understood completely. Problem analysis is the process of breaking a problem into clear, separate parts so that a solution can be designed systematically rather than by trial and error. It has four concerns: understanding exactly what is being asked, identifying the inputs (the data that is given or will be supplied), identifying the outputs (the result that is expected), and identifying any constraints or special conditions the solution must respect. Once these are clear, the programmer defines the process, the sequence of operations that converts the input into the required output. Jumping straight into coding without this analysis is one of the most common causes of a wrong or incomplete solution, since a program built on a misunderstood problem will run without errors and still give the wrong answer.
An algorithm is a finite, step by step set of instructions for solving a problem. To qualify as a good algorithm it must satisfy five properties: finiteness (it terminates after a finite number of steps), definiteness (each step is stated unambiguously), input (it accepts zero or more inputs), output (it produces at least one output), and effectiveness (each step is simple enough to be carried out exactly). For example, an algorithm to find the larger of two numbers a and b can be written as:
A flowchart is the graphical equivalent of an algorithm: a diagram that uses standard shapes joined by arrows to show the flow of control from start to end. An oval marks the start or stop of the process, a parallelogram marks an input or output step, a diamond marks a decision point, and a rectangle marks an ordinary processing step. The algorithm above corresponds to the flow
Start -> Read a, b -> is a > b? --Yes--> Print a -> Stop
--No--> Print b -> Stop
| Symbol | Shape | Meaning |
|---|---|---|
| Terminal | Oval | Start / Stop |
| Input-Output | Parallelogram | Input / Output |
| Decision | Diamond | Decision |
| Process | Rectangle | Processing step |
C Programming for TU BSc CSIT is covered here in full, from syllabus notes to solved past questions. This subject has 11 chapters mapped to the official syllabus, and 84 past exam questions with written model answers. The opening of every note and answer is free, and the most-searched questions are free in full. A free account gets 2 free weeks of the whole program plus flashcards and progress tracking so weak topics come back before the exam.
This TU BSc CSIT C Programming guide covers Problem Solving with Computer, Elements of C, Input and Output, Operators and Expression, Control Statement, Arrays, Functions, Structure and Union, and more, across 11 chapters. It includes model answers to 84 past exam questions, plus flashcards for quick revision.
C Programming has 11 chapters mapped to the official syllabus.
Yes. Each of the 84 past questions comes with a written model answer; the most-searched ones are free in full, the rest open with a free account's 2 free weeks or a pass.
Free to start. The opening of every note and answer is free, the most-searched questions are free in full, and a free account gets 2 free weeks of the whole program plus flashcards and progress tracking. After that a program pass keeps everything open.
Based on the official syllabus.