int arr[5] = 1,2,3,4,5; arr[0] = 10; // index 0-based
break (exit loop/switch), continue (skip iteration), goto (jump to label – avoid when possible). 7. Arrays One-dimensional:
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. programming for problem solving notes pdf
return_type function_name(parameters) // body return value;
switch(expression) case 1: ... break; case 2: ... break; default: ... break; int arr[5] = 1,2,3,4,5; arr[0] = 10; //
#include <stdio.h> // preprocessor directive int main() // main function
char str[] = "Hello"; // null terminated: 'H','e','l','l','o','\0' strlen() , strcpy() , strcat() , strcmp() , strchr() 11. Structures & Unions Structure: groups different data types. break; case 2:
// variable declarations // statements return 0;