C Programming - Count Characters and Words in String - Learn C tutorials by Sanjay Gupta in English

preview_player
Показать описание
Find Here: Links of All C language Video's Playlists/Video Series
C Interview Questions & Answers | Video Series

for | while | do-while loops in c | Video Series

Functions in C | Video Series

Graphics in C | Video Series

1-D Array | 2-D Array | String | Pointer | Function | File Handling in C

Structure & Union in C | Video Series

String in C | Video Series

1-D Array in C | Video Series

2-Array in C | Video Series

C Preprocessor | Video Series

File Handling in C | Video Series

Pointer in C | Video Series

Dynamic Memory Allocation in C | Video Series

Pattern Programs in C | Video Series

Recursion in C | Video Series

#cprogramming #ctutorials #clanguage
Рекомендации по теме
Комментарии
Автор

Thank you very much. You are a genius. 👍👍🔝🔝🙏🙏

vakhariyajay
Автор

Nice playlist whole see in playback speed 2.0 in 1 hour ❤

JayGajera
Автор

Write a program in C to count the number of punctuation characters exists in a string
Sir please explain this problem

nitish
Автор

if word is 3 and spaces is there after last word than it will show wrong output for no of word. how to do that it will not count no of spaces while counting the

nehashahi
Автор

Sir.. I have a doubt
Are the null char and the space same or diff??

althafshaikh
Автор

// program to count no of words and characters without spaces
#include<stdio.h>
#include <string.h>
void main()
{
int i, c=0, d=0;
char a[1000];

printf("Enter a sentence:\n ");
gets(a);

for(i=0;a[i]!='\0';i++)
{
c=c+1;
if(a[i]==' ')
d=d+1;
if(a[i]==32)
c=c-1;
}
printf("The letters are %d ", c);
printf("The words are %d ", d+1);
getch();
}

ayanchaudhary
Автор

this program has some wrong. Word didn't count properly

rajumolla