C language basic to Advance
رفتن به کانال در Telegram
380
مشترکین
+724 ساعت
+437 روز
+17030 روز
آرشیو پست ها
// 5. Break statement in a while loop to exit the loop when a certain condition is met:
#include <stdio.h>
int main() {
int i = 1;
while(i <= 10) {
printf("%d ", i);
if(i == 5) {
break;
}
i++;
}
return 0;
}
/cc // 5. Break statement in a while loop to exit the loop when a certain condition is met:
#include <stdio.h>
int main() {
int i = 1;
while(i <= 10) {
printf("%d ", i);
if(i == 5) {
break;
}
i++;
}
return 0;
}//
4. Nested for loop to print a multiplication table:
#include <stdio.h>
int main() {
int i, j;
for(i=1; i<=10; i++) {
for(j=1; j<=10; j++) {
printf("%d x %d = %d\n", i, j, i*j);
}
printf("\n");
}
return 0;
}
/cc //
4. Nested for loop to print a multiplication table:
#include <stdio.h>
int main() {
int i, j;
for(i=1; i<=10; i++) {
for(j=1; j<=10; j++) {
printf("%d x %d = %d\n", i, j, i*j);
}
printf("\n");
}
return 0;
}// 3. Do-while loop to ask user for input until a valid number is entered:
#include <stdio.h>
int main() {
int num;
do {
printf("Enter a number between 1 and 10: ");
scanf("%d", &num);
} while(num < 1 || num > 10);
printf("You entered: %d", num);
return 0;
}
/cc // 3. Do-while loop to ask user for input until a valid number is entered:
#include <stdio.h>
int main() {
int num;
do {
printf("Enter a number between 1 and 10: ");
scanf("%d", &num);
} while(num < 1 || num > 10);
printf("You entered: %d", num);
return 0;
}// 2. While loop to print even numbers from 2 to 20:
#include <stdio.h>
int main() {
int i = 2;
while(i <= 20) {
printf("%d ", i);
i += 2;
}
return 0;
}
/cc // 2. While loop to print even numbers from 2 to 20:
#include <stdio.h>
int main() {
int i = 2;
while(i <= 20) {
printf("%d ", i);
i += 2;
}
return 0;
}// 1. For loop to print numbers from 1 to 10:
#include <stdio.h>
int main() {
int i;
for(i=1; i<=10; i++) {
printf("%d ", i);
}
return 0;
}
/cc // 1. For loop to print numbers from 1 to 10:
#include <stdio.h>
int main() {
int i;
for(i=1; i<=10; i++) {
printf("%d ", i);
}
return 0;
}// 1 to 100 numbers
#include <stdio.h>
int main() {
for (int i = 1; i <= 10; i++) {
for (int j = 0; j < 10; j++)
if(i < 10)
printf("%d%d ", j, i);
else
printf("%d ", (j + 1) * 10);
printf("\n");
}
return 0;
}
/cc // 1 to 100 numbers
#include <stdio.h>
int main() {
for (int i = 1; i <= 10; i++) {
for (int j = 0; j < 10; j++)
if(i < 10)
printf("%d%d ", j, i);
else
printf("%d ", (j + 1) * 10);
printf("\n");
}
return 0;
}
#include <stdio.h>
int main() {
int num1, num2, sum;
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);
sum = num1 + num2;
printf("Sum of %d and %d is %d\n", num1, num2, sum);
return 0;
}
/* * * * * * * * * * * * * * * * * * * *
How to take user input:
https://youtu.be/VbaKf9FwnDk
Video have a task
* * * * * * * * * * * * * * * * * * * */
( MCS-011 ) C language me backshlash character kya hote hain #Part11
https://youtu.be/PjET6HrGyok
Full Playlist: Click Here
Format specifiers in c programming language
With task
https://youtu.be/gLqmAF850Wo
Operator precedence in c video
With task
https://youtu.be/xTxK0e1io9A?si=-YkRq-CWh2Y4TWZX
Expressions and operators in c detailed
Topics covered:
00: 00 introduction to c operaters
02: 00 All c language operators in detail practically explained
02: 03 Airthmetic operators in c
03: 33 Relational operators in c
05: 07 Logical operators in c
06: 50 Assignment operators or shortcuts in c
09: 00 increment decrement operators in c
09: 41 sizeof and ternary operator in c
10: 59 comma operator in c
11: 44 bitwise operator, address of, pointer dereference, member access operators
12: 23 expressions in c language
https://youtu.be/qerhr7-a9TM?si=4v1uf0S6Nxep_pHA
How to run c code manually without and with vs code in any os
https://youtu.be/22kOt_PLpGs?si=kO2_xiFxFOREsmXo
Variables and constants in C language for absolute beginners
https://youtu.be/GPat5ENZytg?si=h9vm8GpHHfONEu24
