Programming For Problem Solving Notes Pdf Apr 2026
switch(expression) case 1: ... break; case 2: ... break; default: ... break;
// variable declarations // statements return 0; programming for problem solving notes pdf
Machine (1GL) → Assembly (2GL) → High-level (3GL: C, Python) → 4GL, 5GL. switch(expression) case 1:
scanf("%d", &x); // read printf("Value: %d", x); // print Arithmetic: +, -, *, /, % Relational: ==, !=, <, >, <=, >= Logical: && (AND), || (OR), ! (NOT) Assignment: =, +=, -=, etc. Increment/Decrement: ++, -- (prefix/postfix) switch(expression) case 1: ... break
char str[] = "Hello"; // null terminated: 'H','e','l','l','o','\0' strlen() , strcpy() , strcat() , strcmp() , strchr() 11. Structures & Unions Structure: groups different data types.
Source code (.c) → Preprocessor → Compiler → Object code → Linker → Executable (.exe)