C problems for beginner

array in c

Searching for a Value in an array in c programming

Searching for a Value in an array in c programming #include<stdio.h> int main() { int num[]={12,34,56,78,19}; int pos=-1,value,i; scanf(“%d”,&value); for(i=0;i<5;i++) { if(value==num[i]){ pos=i+1; break; } } if(pos==-1){ printf(“value is not common”); } else printf(“value %d is found at %d position”,value,pos); } INPUT: 78 OUTPUT: value 78 is found at 4 positio A fundamental task in …

Searching for a Value in an array in c programming Read More »

How to write a C program to find and sum all numbers divisible by 9 between 100

How to write a C program to find and sum all numbers divisible by 9 between 100 || Free Code Center

How to write a C program to find and sum all numbers divisible by 9 between 100 Introduction Welcome to our comprehensive guide on finding and summing all numbers divisible by 9 between 100 and a user input in a C program. In this article, we will provide you with a step-by-step approach to solve …

How to write a C program to find and sum all numbers divisible by 9 between 100 || Free Code Center Read More »

Program To Find Cube In C

Program To Find Cube In C || Free Code Center

Program To Find Cube In C Introduction In this article, we present a comprehensive program written in the C programming language to find the cube of a given number. Our program utilizes efficient algorithms and follows best coding practices, ensuring both accuracy and performance. By following the step-by-step guide below, you will be able to …

Program To Find Cube In C || Free Code Center Read More »

The sum of n number of odd natural number in C

The sum of n number of odd natural number in C | Free code Center

The sum of n number of odd natural number in C Write a C program to display the n terms of odd natural numbers and their sum.like: 1 3 5 7 … n #include<stdio.h> void main () { int i,n,odd=0,sum=0; scanf(“%d”,&n); for(i=1;i<=n;i++){ if(i%2!=0){ printf (“%d”,i); sum=i+n; } } printf(“\nThe odd numbers are :%d\n”,i); printf(“The Sum …

The sum of n number of odd natural number in C | Free code Center Read More »

How to compare ASCII values in C

How to compare ASCII values in C | How to compare char in C | Free Code Center

How to compare ASCII values in C? #include<stdio.h> int main() { int num = 65; // ASCII value of ‘A’ char ch = ‘B’; // ASCII value of ‘B’ if(num == ch) { printf(“The values are equal\n”); } else { printf(“The values are not equal\n”); } return 0; } How to compare ASCII values in …

How to compare ASCII values in C | How to compare char in C | Free Code Center Read More »

C Program to Calculate area of right angle triangle

C Program to Calculate area of right angle triangle-6

C Program to Calculate area of right angle triangle Introduction Welcome to our comprehensive guide on calculating the area of a right-angled triangle. In this article, we will provide you with a step-by-step approach to accurately determine the area of a right-angled triangle. By following the methods outlined below, you will gain a solid understanding …

C Program to Calculate area of right angle triangle-6 Read More »

C program to find area and Perimeter of Rectangle

C program to find area and Perimeter of Rectangle-1

C program to find area and Perimeter of Rectangle #include<stdio.h> int main() { int length,wight,area=0; printf(“Enter a length and wight:”); scanf(“%d %d”,&length,&wight); area=length*wight; printf(“area of rectangle is:%d”,area); return 0; } C program to find area and Perimeter of Rectangle This code is a simple C program that calculates the area of a rectangle based on …

C program to find area and Perimeter of Rectangle-1 Read More »

C Program to Calculate Cube of a Number

C Program to Calculate Cube of a Number || practice coding

How to write a C Program to Calculate Cube of a Number using Functions with an example? C Program to Calculate Cube of a Number #include<stdio.h> void main () { int i,cube; scanf(“%d”,&i); for(int i=1;i<=5;i++){ cube=i*i*i; printf(“\nnumber is %d and cube of the %d is :%d”,i,i,cube); } } C Program to Calculate Cube of a …

C Program to Calculate Cube of a Number || practice coding Read More »

Scroll to Top
NEW TOXIC ROCKET CYCLE DECK in Clash Royale 2023 Best Deck in Clash Royale Best Deck for Arena 8 in Clash Royale Best Hog deck for Pro players Best Clash Royale Deck