Advertisement
Guest User

Untitled

a guest
Sep 26th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. //LABACT#4
  4. void main()
  5. {
  6. char theString[100];
  7. int iCount=0;
  8. int loopPJ=0;
  9.  
  10. printf("Enter String:");
  11. gets(theString);
  12.  
  13. while(theString[iCount]!='\0')
  14. {
  15. if(theString[iCount]!=' ')
  16. loopPJ++;
  17. iCount++;
  18. }
  19.  
  20. //printf("The String Entered is %s",theString);
  21. printf("\nThe Actual length of the string is %d",loopPJ);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement