A

@adarshb2005

C Program to Remove all lowercase characters in the string

C
2 years ago
#include<stdio.h> #include<string.h> int main() { char str[100]; printf("Enter your String:"); scanf("%[^\n]",str); int i,j; for (i = 0; str[i] != '\0'; i++) {

C Program to Remove all uppercase characters in the string

C
2 years ago
#include<stdio.h> #include<string.h> int main() { char str[100] ; printf("Enter your String:"); scanf("%[^\n]",str); int i,j; for (i = 0; str[i] != '\0'; i++) {

10. C programming code to remove all characters from string except alphabets

C
2 years ago
#include <stdio.h> #include<string.h> int main() { char str[100]; int i, j; printf("Enter your String:"); scanf("%[^\n]",str); for(i = 0; str[i] != '\0'; ++i) {

. C programming code to remove all alphabets from string except special charcters

C
2 years ago
#include <stdio.h> #include<string.h> int main() { char str[100] ; int i, j; printf("Enter your String:\n\n"); scanf("%[^\n]",str); for(i = 0; str[i] != '\0'; ++i) {

prime new

C
2 years ago
#include <stdio.h> #include <stdlib.h> int main() { int n,i,flag=0; printf("ENTER THE NUMBER\n"); scanf("%d",&n); for(i=2;i<n/2;i++){ if(n%i==0) {

ascending

C
2 years ago
#include <stdio.h> void bubbleSort(int arr[],int n){ for(int i=0;i<n-1;i++) { for(int j=0;j<n-1;j++){ if(arr[j]>arr[j+1]);{ int temp=arr[j]; arr[j]=arr[j+1];

matrix

C
2 years ago
#include <stdio.h> #include <math.h> int main() { int A[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int B[3][3]={{9,8,7},{6,5,4},{3,2,1}}; int C[3][3]={0}; int rows_A=3; int cols_A=3;

array sorting in ascending order

C
2 years ago
#include <stdio.h> void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } }

Spiral

C
2 years ago
#include <stdio.h> void spiralOrder(int matrix[][4], int n) { int top = 0, boƩom = n - 1, left = 0, right = n - 1; while (top <= bottom && left <= right) { for (int i = left; i <= right; i++) {

Matrix

C
2 years ago
#include <stdio.h> int main() { int A[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; int B[3][3] = {{9, 8, 7}, {6, 5, 4}, {3, 2, 1}}; int C[3][3] = {0}; int rows_A = 3, cols_A = 3; int rows_B = 3, cols_B = 3; for (int i = 0; i < rows_A; i++) {

Duplicate element

C
2 years ago
#include<stdio.h> int main() { int arr[] = {1, 2, 2, 4, 5, 5, 5}; int n = sizeof(arr) / sizeof(arr[0]); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) {

Array reverseArray

C
2 years ago
#include <stdio.h> void reverseArray(int arr[], int n) { int start = 0; int end = n - 1; while (start < end) {

Array search

C
2 years ago
#include<stdio.h> int main() { int arr[] = {12, 45, 1, 78, 32, 65}; int n = sizeof(arr) / sizeof(arr[0]); int target = 78; int position = -1;

sum2

C
2 years ago
#include <stdio.h> int main() { int a ,b,c; printf("Enter a:\n"); scanf("%d", &a); printf("Enter b:\n"); scanf("%d", &b); printf("c1 = %d\n",a+b); printf("c2 = %d\n",a-b);

sum

C
2 years ago
#include <stdio.h> int main() { char +,-,/,*; printf("Enter the operators:\n"); int a,b,c; printf("Enter the 2 numbers:\n"); scanf("%d%d",&a,&b); { switch()

Fibonacci series

C
2 years ago
#include <stdio.h> int main() { int n, first = 0, second = 1, x, i; printf("Enter the number of terms: "); scanf("%d", &n); printf("Fibonacci Series: "); for (i = 0; i < n; i++) {

Armstrong

C
2 years ago
#include <stdio.h> #include <math.h> int main() { int number, originalNumber, remainder, result = 0, n = 0; printf("Enter an integer: "); scanf("%d", &number); originalNumber = number;

QUADRATIC EQN

C
2 years ago
#include<stdio.h> #include<math.h> int main() { int a,b,c,x; float root1,root2; printf("enter the coefficient a,b,c:"); scanf("%d%d%d",&a,&b,&c); x= b*b-4*a*c; if(x>0)

Area

C
2 years ago
#include <stdio.h> #include <math.h> int main() { double radius, area; printf("Enter the radius of the circle: "); scanf("%lf", &radius); area = 3.14*radius *radius;

Exponential

C
2 years ago
#include<stdio.h> #include<math.h> int main() { int x,i; int fact = 1,n; float sum=0;