C Program to count words in a sentence

  Рет қаралды 71,544

MySirG.com

MySirG.com

Күн бұрын

Like, Comments, Share and SUBSCRIBE
visit www.mysirg.com for all FREE videos

Пікірлер: 54
@hary4065
@hary4065 4 жыл бұрын
That was a much-anticipated code. I was working on it but couldn't code it right. Thanks for it. it feels like someone is watching over me.
@carishikeshshah
@carishikeshshah 8 жыл бұрын
Such a clean explanation. Great! Keep up the good work. Sirg request you to start separate section on informatics Olympiad questions.
@aadeshn4816
@aadeshn4816 5 жыл бұрын
More simpler inside for loop take if (n[i] >=65 && n[i]=97 && n[i]
@abdulhaitalha5944
@abdulhaitalha5944 8 жыл бұрын
sir thank you very much sir.......ur explanation is just awesome....clear and understandable
@umargul5644
@umargul5644 2 жыл бұрын
Great job sir
@harmanndhiman9492
@harmanndhiman9492 4 жыл бұрын
Is it possible to have c be able to seperate words from text in a user input like: when you run code and type this question: How is the weather? Is it possible for it too seperate each word and see how in the sentence?
@Gamersodyssey-v3m
@Gamersodyssey-v3m 3 жыл бұрын
Sir aap kaun sa compiler use kr rhe hai
@sadeqbetter
@sadeqbetter 4 жыл бұрын
Sir you have good context
@mysirgdotcom
@mysirgdotcom 4 жыл бұрын
not judging but spelling is not correct...and sorry if I am ugly, nature give me that.😩
@sadeqbetter
@sadeqbetter 4 жыл бұрын
@@mysirgdotcom i was joking iam a fan i wanted you to reply :)
@anilkushwahaji5788
@anilkushwahaji5788 8 жыл бұрын
sir nice nice video i thanks a lot becoz of you i able to understand, lot of concept
@yashvashisth310
@yashvashisth310 6 жыл бұрын
but what about your english ?why is it so bad? Any plans to improve it A-hole??
@abdulhaitalha5944
@abdulhaitalha5944 8 жыл бұрын
sir is ur c progrmming tutorial is enough for us to survive in the field???
@anveshreddy1245
@anveshreddy1245 3 жыл бұрын
How to program if we want to count unique words in a string please answer
@SpeaktruthAndhra
@SpeaktruthAndhra 5 жыл бұрын
Hi sir , please make a video of factorial of largest number...:(
@reaper_coc6358
@reaper_coc6358 6 жыл бұрын
without function or pointer it is possible to count???
@sumitkushwaha3033
@sumitkushwaha3033 6 жыл бұрын
reaper_coc yes
@bishwajeetsharma3498
@bishwajeetsharma3498 7 жыл бұрын
sir pehle hi ek printf Chala denge"please enter one space between two words"😀
@sumitkushwaha3033
@sumitkushwaha3033 6 жыл бұрын
Bishwajeet Sharma hahahha😂😂😂😂
@sumitkushwaha3033
@sumitkushwaha3033 6 жыл бұрын
Bishwajeet Sharma nice logic bahut aage tak jaoge😉😉😉
@deepsagore8286
@deepsagore8286 4 жыл бұрын
😂
@Gamersodyssey-v3m
@Gamersodyssey-v3m 3 жыл бұрын
haa sahi bola bhai
@hafizosamanizami1377
@hafizosamanizami1377 2 жыл бұрын
😂
@silverbullet_6
@silverbullet_6 5 жыл бұрын
sir, if we check i-- if s[i] is a space and make count ++ if i - - is an alphabet and we check the s[strlen(s)] to alter count. is it possible
@musicalcandy1700
@musicalcandy1700 3 жыл бұрын
I am new in this can someone tell me which ide is this and from where I can download
@akshaydod3114
@akshaydod3114 7 жыл бұрын
could you please provide the solution of the below program? program for the maximum number of words in a sentence. Given text can be divided into sentences by splitting it at dots, question marks and exclamation marks. For example, given S= "We test coders. Give us a try?", the function should return 4.
@ashishsinha8893
@ashishsinha8893 8 жыл бұрын
sir, what is the use of malloc and calloc function...
@akashkhatri4652
@akashkhatri4652 6 жыл бұрын
malloc is used for memory allocation.
@piyushbairagi4817
@piyushbairagi4817 5 жыл бұрын
malloc() amd calloc() both are used for dynamic memory allocation for the variable .
@SpeaktruthAndhra
@SpeaktruthAndhra 5 жыл бұрын
Malloc() and calloc() functions helps to allocate dynamic memory. Then interviewer ask question is it really malloc () and calloc() functions allocate memory ? Answer is no , reason: brk() and sbrk() system calls called malloc and calloc functions internally ,to allocate memory (in Linux concept you will get it)
@kashba
@kashba 2 жыл бұрын
An easier way to solve the problem int main(void) { int i=0,k=0; int f=4; char a[200]=" aman saurabh kashba "; for(i=0;i
@sayantaniguha8519
@sayantaniguha8519 3 жыл бұрын
*To remove extra spaces in a sentence :* for(i=0;s[i];i++) { if(s[i]==' ' && s[i+1]==' ') { for(int y=i+1;s[y];y++) s[y] =s[y+1]; i--; } } if(s[0]==' ') for(k=1;s[k];k++) printf("%c",s[k]); else printf("%s",s); //There might be an extra space at the end of the string!!
@prashantdwivedi1736
@prashantdwivedi1736 5 жыл бұрын
Sir i made it without using pointers. I used the ASCII code of space viz.32
@anjneykumarsingh4461
@anjneykumarsingh4461 4 жыл бұрын
Can u plz share brother
@iplindia8365
@iplindia8365 4 жыл бұрын
Sir, p=malloc (steven(s)+1); this line has any error!?, because my IDE Xcode shows to me an syntax error
@garvbhatt7513
@garvbhatt7513 3 жыл бұрын
Same Invalid conversion from void* to char*
@PrashantSingh-tp1gj
@PrashantSingh-tp1gj 2 жыл бұрын
malloc() returns address but you need to typecast this malloc as it returns value to a void pointer. p = (char*)malloc(strlen(s)+1); Also include header file for using malloc ()
@HarshKumar-zm1jl
@HarshKumar-zm1jl 3 жыл бұрын
;) thankss
@mdshamshalam8925
@mdshamshalam8925 7 жыл бұрын
Nice concept. but i have one doubt sir. while removing extra space to count number of words. you wrote logic only for removing space . if it is tab then what will happend. if user enter tab between two word then what will happens plz consider this situation. waiting for reply......
@sumitkushwaha3033
@sumitkushwaha3033 6 жыл бұрын
MD SHAMSH ALAM if it tab then also not to worry.. becoz no of spaces by tab stores in string index by index so there is increment in index number if found space...so its clear😊
@anilkushwahaji5788
@anilkushwahaji5788 8 жыл бұрын
wow sir
@deepsagore8286
@deepsagore8286 4 жыл бұрын
Gives error -Cannot convers void* to char * Compiler turbo
@TechByJSC
@TechByJSC 6 жыл бұрын
Why stelen+1 sir,1 is not needed
@shubhamsharma-ew4wv
@shubhamsharma-ew4wv 7 жыл бұрын
i got the error like "incompatable decleration of built in function malloc ()"
@abhishekbhowmick5912
@abhishekbhowmick5912 6 жыл бұрын
You should include standard input-output program by #include at the start of the function.
@RameshMaity90
@RameshMaity90 Жыл бұрын
2023😍😍
@rakhibaghel9721
@rakhibaghel9721 7 жыл бұрын
sir malloc ka used kyo kiya gya h samz nhu ayaa
@abhishekbhowmick5912
@abhishekbhowmick5912 6 жыл бұрын
Malloc() is used for dynamic memory allocation, when we don't know the length of array needed, we just call this function to create such an array that can contain the string.
@abhishekbhowmick5912
@abhishekbhowmick5912 6 жыл бұрын
You can also check this video kzbin.info/www/bejne/kITdq4xplsmZeq8
@iplindia8365
@iplindia8365 4 жыл бұрын
strlen hogatha
@Anurag_singh51
@Anurag_singh51 5 жыл бұрын
confusing
@keertiaggarwal3364
@keertiaggarwal3364 6 жыл бұрын
Complicate
C Program to reverse a string word wise
37:30
MySirG.com
Рет қаралды 46 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 30 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 15 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 12 МЛН
C Program to check whether a string is palindrome or not
22:29
MySirG.com
Рет қаралды 191 М.
patterns in C - Tips and Tricks
1:18:42
CSE GURUS
Рет қаралды 817 М.
C Program to find substring in a string
19:22
MySirG.com
Рет қаралды 111 М.
Program to print Pascal Triangle in C Language Hindi
27:00
MySirG.com
Рет қаралды 61 М.
C program to express a number as a sum of two prime numbers
27:54
C_69 C Program to Reverse a String | with strrev() and without strrev() function
24:51
String In Char Array VS. Pointer To String Literal | C Programming Tutorial
9:58
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 30 МЛН