Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Comment



Header file



" ; " after loop



Specifer



Iterative statement




String_ space count




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include #define pf printf int main() { int i,count=0; char str[100]; pf("Enter the string: "); gets(str); for(i=0;str[i]!='\0';i++) { if(str[i]==' ') //finding space count++; //counting total space } pf("\nThe total space in the string = %d",count); }
OUTPUT:


© 2018 - All rights reserved