C language basic to Advance @c_codes_pro Channel on Telegram

C language basic to Advance

@c_codes_pro


@bca_mca_btech

C language basic to Advance (English)

Are you passionate about coding and looking to enhance your skills in C language? Look no further than the 'C language basic to Advance' Telegram channel! With the username @c_codes_pro, this channel is your one-stop destination for all things related to C programming, from the basics to advanced concepts. Whether you are a beginner just starting out or an experienced programmer looking to sharpen your skills, this channel has something for everyone.nnWho is it for? This channel is perfect for students pursuing a degree in BCA, MCA, or BTech, as well as anyone interested in learning or improving their C programming skills. The content is designed to cater to individuals at different proficiency levels, so whether you are a novice or a seasoned coder, you will find valuable resources to help you master the intricacies of C language.nnWhat is it? The 'C language basic to Advance' Telegram channel is a platform where members can access a wide range of materials, including tutorials, sample codes, programming exercises, and tips for optimizing C code. The channel also hosts discussions, Q&A sessions, and coding challenges to engage and challenge its community members. With regular updates and a supportive community, you can stay motivated and on track towards becoming a proficient C programmer.nnJoin @c_codes_pro today and take your C programming skills to the next level! Whether you are aiming to ace your exams, build a career in software development, or simply enjoy coding as a hobby, this channel has the resources and support you need to succeed. Don't miss out on this opportunity to grow your programming skills and connect with like-minded individuals. See you on the channel!

C language basic to Advance

29 Aug, 14:46


In these days rust is getting much popular

1) Because of it's speed of execution.
2) It's full controll on system memory
3) it's ownership model
4) And integration to other languages

So why wait let's join our rust channel
https://t.me/Rust_Codes_Pro

C language basic to Advance

15 Aug, 03:26


आप सभी को स्वतंत्रता दिवस की हार्दिक बधाई 🇮🇳🇮🇳

C language basic to Advance

13 Aug, 14:27


Become Termux Expert in Hindi Series Video No.: 7 | Change Termux Permission
https://youtu.be/53b40lkce3s

C language basic to Advance

11 Aug, 03:27


1. भारतीय संविधान को लिखने का कार्य किसने किया था?
- भारतीय संविधान को प्रेम बिहारी नारायण रायज़ादा ने अंग्रेजी में और वसंत कृष्ण वैद्य ने हिंदी में हाथ से लिखा था।

2. संविधान सभा का अध्यक्ष कौन था?
- .....
More details join: https://t.me/SidsAnalysis/38

Join for daily intrusting knowledge

C language basic to Advance

09 Aug, 09:36


All 20 questions and answers related to c loops 👆👇
https://t.me/C_Codes_pro/184

C language basic to Advance

09 Aug, 09:35


// 20. Print all perfect numbers between 1 and 1000 using a for loop:

#include <stdio.h>

int main() {
int num, i, sum;

printf("Perfect numbers between 1 and 1000 are:\n");
for(num = 1; num <= 1000; num++) {
sum = 0;

for(i = 1; i <= num / 2; i++) {
if(num % i == 0) {
sum += i;
}
}

if(sum == num && num != 0) {
printf("%d\n", num);
}
}

return 0;
}

C language basic to Advance

09 Aug, 09:34


// 19. Print all Armstrong numbers between 1 and 1000 using a for loop:

#include <stdio.h>
#include <math.h>

int main() {
int num, originalNum, remainder, result, n;

printf("Armstrong numbers between 1 and 1000 are:\n");
for(num = 1; num <= 1000; num++) {
originalNum = num;
result = 0;
n = log10(num) + 1;

while(originalNum != 0) {
remainder = originalNum % 10;
result += pow(remainder, n);
originalNum /= 10;
}

if(result == num) {
printf("%d\n", num);
}
}

return 0;
}

C language basic to Advance

09 Aug, 09:34


// 18. Find the LCM of two numbers using a while loop:

#include <stdio.h>

int main() {
int a, b, max;

printf("Enter two numbers: ");
scanf("%d %d", &a, &b);

max = (a > b) ? a : b;

while(1) {
if(max % a == 0 && max % b == 0) {
printf("LCM is: %d\n", max);
break;
}
max++;
}

return 0;
}

C language basic to Advance

09 Aug, 09:33


// 17. Find the GCD of two numbers using a while loop:

#include <stdio.h>

int main() {
int a, b;

printf("Enter two numbers: ");
scanf("%d %d", &a, &b);

while(a != b) {
if(a > b)
a = a - b;
else
b = b - a;
}

printf("GCD is: %d\n", a);

return 0;
}

C language basic to Advance

09 Aug, 09:33


// 16. Convert a binary number to decimal using a while loop:

#include <stdio.h>
#include <math.h>

int main() {
int binary, decimal = 0, base = 1, rem;

printf("Enter a binary number: ");
scanf("%d", &binary);

while(binary > 0) {
rem = binary % 10;
decimal = decimal + rem * base;
binary = binary / 10;
base = base * 2;
}

printf("Decimal representation: %d\n", decimal);

return 0;
}

C language basic to Advance

09 Aug, 09:32


// 15. Convert a decimal number to binary using a while loop:

#include <stdio.h>

int main() {
int num, binary[32], i = 0;

printf("Enter a decimal number: ");
scanf("%d", &num);

while(num > 0) {
binary[i] = num % 2;
num = num / 2;
i++;
}

printf("Binary representation: ");
for(int j = i-1; j >= 0; j--) {
printf("%d", binary[j]);
}
printf("\n");

return 0;
}

C language basic to Advance

09 Aug, 09:31


// 14. Check if a given number is a palindrome or not using a while loop:

#include <stdio.h>

int main() {
int num, originalNum, reversedNum = 0;

printf("Enter a number: ");
scanf("%d", &num);

originalNum = num;

while(num != 0) {
reversedNum = reversedNum * 10 + num % 10;
num /= 10;
}

if(originalNum == reversedNum) {
printf("%d is a palindrome.\n", originalNum);
} else {
printf("%d is not a palindrome.\n", originalNum);
}

return 0;
}

C language basic to Advance

09 Aug, 09:30


// 13. Find the sum of the digits of a given number using a while loop:

#include <stdio.h>

int main() {
int num, sum = 0;

printf("Enter a number: ");
scanf("%d", &num);

while(num != 0) {
sum += num % 10;
num /= 10;
}

printf("Sum of the digits is: %d\n", sum);
return 0;
}

C language basic to Advance

09 Aug, 09:30


// 12. Sort an array in descending order using a for loop:

#include <stdio.h>

int main() {
int n;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

for(int i = 0; i < n-1; i++) {
for(int j = i+1; j < n; j++) {
if(arr[i] < arr[j]) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
}

printf("Array in descending order:\n");
for(int i = 0; i < n; i++) {
printf("%d ", arr[i]);
}
printf("\n");

return 0;
}

C language basic to Advance

09 Aug, 09:29


// 11. Sort an array in ascending order using a for loop:

#include <stdio.h>

int main() {
int n;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

for(int i = 0; i < n-1; i++) {
for(int j = i+1; j < n; j++) {
if(arr[i] > arr[j]) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
}

printf("Array in ascending order:\n");
for(int i = 0; i < n; i++) {
printf("%d ", arr[i]);
}
printf("\n");

return 0;
}

C language basic to Advance

09 Aug, 09:28


// 10. Reverse an array using a for loop:

#include <stdio.h>

int main() {
int n;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

printf("Reversed array:\n");
for(int i = n-1; i >= 0; i--) {
printf("%d ", arr[i]);
}
printf("\n");

return 0;
}

C language basic to Advance

09 Aug, 09:27


// 9. Find the smallest element in an array using a for loop:
#include <stdio.h>

int main() {
int n;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

int smallest = arr[0];
for(int i = 1; i < n; i++) {
if(arr[i] < smallest) {
smallest = arr[i];
}
}

printf("The smallest element in the array is: %d\n", smallest);
return 0;
}

C language basic to Advance

09 Aug, 09:27


// 8. Find the largest element in an array using a for loop:
#include <stdio.h>

int main() {
int n;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

int largest = arr[0];
for(int i = 1; i < n; i++) {
if(arr[i] > largest) {
largest = arr[i];
}
}

printf("The largest element in the array is: %d\n", largest);
return 0;
}

C language basic to Advance

09 Aug, 09:25


// 7. Find the sum of all elements in an array using a for loop:

#include <stdio.h>

int main() {
int n, sum = 0;

printf("Enter the number of elements in the array: ");
scanf("%d", &n);

int arr[n];
printf("Enter the elements of the array:\n");
for(int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}

for(int i = 0; i < n; i++) {
sum += arr[i];
}

printf("Sum of all elements in the array is: %d\n", sum);
return 0;
}