CSS Computer Science (Optional) — Paper-I, Section-A, Topic II subtopic. How programs read input and produce output, and the categories of instructions that make up a program.

Standard I/O Streams

I/O in C

I/O in C++

Formatted vs Unformatted I/O

Statement Types

Statement Type Purpose Example
Declaration Introduces an identifier and its type <code>int x;</code>
Expression/Assignment Evaluates an expression and optionally stores the result <code>x = a + b;</code>
Control Alters the normal sequential flow <code>if(x>0){...}</code>
I/O Transfers data in/out of the program <code>cin >> x;</code>
Compound/Block Groups multiple statements as one unit <code>{ stmt1; stmt2; }</code>
Null Does nothing (just a semicolon) <code>;</code>