C program to find the length of a String without using function strlen()
#include <stdio.h> int main() { char str[100],i; printf(“Enter a string: \n”); scanf(“%s”,str); for(i=0; str[i]!=’\0′; ++i); printf(“\nLength of input string: %d”,i);
Read more#include <stdio.h> int main() { char str[100],i; printf(“Enter a string: \n”); scanf(“%s”,str); for(i=0; str[i]!=’\0′; ++i); printf(“\nLength of input string: %d”,i);
Read more#include<stdio.h> #include<math.h> int main() { int triangle_side; float triangle_area, temp_variable; printf(“\nEnter the Side of the triangle:”); scanf(“%d”,&triangle_side); temp_variable = sqrt(3)
Read more#include <stdio.h> int main() { int circle_radius; float PI_VALUE=3.14, circle_area, circle_circumf; printf(“\nEnter radius of circle: “); scanf(“%d”,&circle_radius); circle_area = PI_VALUE
Read more#include<stdio.h> void quicksort(int number[25],int first,int last){ int i, j, pivot, temp; if(first<last){ pivot=first; i=first; j=last; while(i<j){ while(number[i]<=number[pivot]&&i<last) i++; while(number[j]>number[pivot])
Read more#include<stdio.h> int main(){ int i, j, count, temp, number[25]; printf(“How many numbers u are going to enter?: “); scanf(“%d”,&count); printf(“Enter
Read more#include <stdio.h> int main() { int n, count, sum = 0; printf(“Enter the value of n(positive integer): “); scanf(“%d”,&n); for(count=1;
Read more#include <stdio.h> int main() { int num, reverse_num=0, remainder,temp; printf(“Enter an integer: “); scanf(“%d”, &num); temp=num; while(temp!=0) { remainder=temp%10;
Read more#include <stdio.h> int main() { char ch; printf(“Enter any character: “); scanf(“%c”,&ch); if( (ch>=’a’ && ch<=’z’) || (ch>=’A’ &&
Read more#include<stdio.h> int main() { // This variable is to store the input number int num; printf(“Enter an integer: “); scanf(“%d”,&num);
Read moreProblem Statement: If a five-digit number is input through the keyboard, write a program to calculate the sum of its
Read more