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
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!
29 Aug, 14:46
13 Aug, 14:27
11 Aug, 03:27
09 Aug, 09:36
09 Aug, 09:35
#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;
}
09 Aug, 09:34
#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;
}
09 Aug, 09:34
#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;
}
09 Aug, 09:33
#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;
}
09 Aug, 09:33
#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;
}
09 Aug, 09:32
#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;
}
09 Aug, 09:31
#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;
}
09 Aug, 09:30
#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;
}
09 Aug, 09:30
#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;
}
09 Aug, 09:29
#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;
}
09 Aug, 09:28
#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;
}
09 Aug, 09:27
#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;
}
09 Aug, 09:27
#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;
}
09 Aug, 09:25
#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;
}