top of page
  • X
  • Instagram
  • Black LinkedIn Icon
  • YouTube
  • Medium
  • Black Facebook Icon
  • TikTok

Programming - For Problem Solving Notes Pdf

return_type function_name(parameters) // body return value;

struct Student int roll; char name[20]; float marks; ; struct Student s1 = 1, "John", 85.5; same memory shared among members (size = largest member). 12. File Handling Basic operations: Open, Read, Write, Close.

Machine (1GL) → Assembly (2GL) → High-level (3GL: C, Python) → 4GL, 5GL. programming for problem solving notes pdf

if (condition) // code; else if (cond2) // code; else // code;

// variable declarations // statements return 0; Machine (1GL) → Assembly (2GL) → High-level (3GL:

int arr[5] = 1,2,3,4,5; arr[0] = 10; // index 0-based

() → ++ -- → * / % → + - → < > <= >= → == != → && → || → = 5. Conditional Statements if-else: (NOT) Assignment: =, +=, -=, etc

scanf("%d", &x); // read printf("Value: %d", x); // print Arithmetic: +, -, *, /, % Relational: ==, !=, <, >, <=, >= Logical: && (AND), || (OR), ! (NOT) Assignment: =, +=, -=, etc. Increment/Decrement: ++, -- (prefix/postfix)

char str[] = "Hello"; // null terminated: 'H','e','l','l','o','\0' strlen() , strcpy() , strcat() , strcmp() , strchr() 11. Structures & Unions Structure: groups different data types.

switch(expression) case 1: ... break; case 2: ... break; default: ... break;

bottom of page