“The C and Embedded C modules are explained exactly the way core company interviewers ask them. I cleared my Bosch technical round using this dashboard.”
Coding
Coding Dashboard
Learn C, C++ and Python from the ground up — theory, syntax reference and a live editor with instant compilation output. Switch languages any time without leaving the page.
Core Introduction — C
C is a compiled, procedural, statically typed language created by Dennis Ritchie in 1972. It sits very close to the hardware while still being readable, which is why it is called a middle-level language.
C is used wherever speed, small memory footprint and direct hardware access matter. Your code is translated by a compiler (GCC) into machine instructions before it runs.
Variables & Data Types
A variable is a named block of memory. In C you must declare the type before use, because the compiler needs to know how many bytes to reserve.
int (4 bytes), float (4 bytes), double (8 bytes), char (1 byte). Add unsigned to store only positive values and double the positive range.
The name refers to an address in RAM; the & operator gives you that address and a pointer variable can store it.
int age = 21; /* 4 bytes */
float voltage = 3.3f; /* 4 bytes */
char grade = 'A'; /* 1 byte */
const int PIN = 13; /* read-only */
printf("%d %.1f %c\n", age, voltage, grade);Conditional Statements
if runs a block when the condition is non-zero. else if chains extra tests and else is the fallback.
switch compares one integer or char against constant cases. Every case needs break, otherwise execution falls through to the next case.
int marks = 78;
if (marks >= 90) {
printf("Grade A\n");
} else if (marks >= 75) {
printf("Grade B\n");
} else {
printf("Grade C\n");
}
switch (grade) {
case 'A': printf("Excellent\n"); break;
case 'B': printf("Good\n"); break;
default: printf("Keep going\n");
}Blocks, Loops & Control Flow
Curly braces { } create a block, and a variable declared inside a block dies at its closing brace. That is called scope.
for is used when the number of iterations is known, while when it depends on a condition, and do-while always runs at least once.
break leaves the loop immediately, continue skips to the next iteration.
for (int i = 1; i <= 5; i++) {
if (i == 3) continue;
printf("%d ", i);
}
int n = 3;
while (n > 0) {
printf("count %d\n", n);
n--;
}Syntax Reference
Every C program starts at main(). Statements end with a semicolon and headers are included with #include.
printf uses format specifiers: %d int, %f float, %c char, %s string, %p pointer.
#include <stdio.h>
int square(int x) {
return x * x;
}
int main() {
printf("Square = %d\n", square(7));
return 0;
}$ Press “Compile C” to run your program…What students say
Rated 5.0 out of 5 by core engineering students using RiyasTech Hub.
“Being able to write code and see the output instantly, without installing a compiler, saved me hours before every placement test. RiyasTech Hub is brilliant.”
“The Python section finally made loops and indentation click for me. Clean layout, works perfectly on my phone during travel.”
“The C++ OOPs theory plus the live editor is the best free combination I have found. Highly recommended for core branch students.”