Really appreciate this video. Your way of teaching is so powerful
@pcuser802 жыл бұрын
You can also use strcasecmp does the same as strcmp but ignores the case.
@CodeVault2 жыл бұрын
Oh cool! I didn''t even know about the strcasecmp function. Thanks! I'm still on the fence about covering non-standard functions on the channel though (same reason why I didn't use strlwr in this video) What do you think? Should I start covering all these non-standard yet popular functions?
@pcuser802 жыл бұрын
@@CodeVault Yes Please
@aatishlanghee2 жыл бұрын
Hi, Thank you for this amazing video. Can you please create complete C language tutorials playlist from beginner to advance in a practical hands on way. It would be good for us to get some hands on experience on the industry based problems.
@CodeVault2 жыл бұрын
I'll look into it. Thanks for the recommendation!
@bushraw662 жыл бұрын
Thank you so much for this video. I have a question tho, at 6:27 can't we just use else{} instead whar you wrote in line 20?
@CodeVault2 жыл бұрын
Else for the if in the for loop you mean?
@bushraw662 жыл бұрын
@@CodeVault yes , instead of writing that i>=3 does it work with just an else ?
@CodeVault2 жыл бұрын
Not really, since the message would be printed for every element that is not equal to the one you're searching
@NoNameAtAll22 жыл бұрын
can you repeat please the need for `input[strlen(input)-1]=0` line? since there is already a null character, why overwrite last input char with 2nd one?
@0llie_K2 жыл бұрын
A new line character: ' ' is read as the last input char when the return key is pressed, In this instance it is not wanted and is therefore removed by replacing it with a null terminator.
@CodeVault2 жыл бұрын
Take a look at the video I pointed to: code-vault.net/lesson/yxllgxvfmb:1603733521595 It explains this and why we use fgets instead of scanf
@pcuser802 жыл бұрын
@@CodeVault I use this always for removing end of line , works for windows and linux input[strcspn(input, " ")] = 0;
@soufianeamimi2 жыл бұрын
Can u explain about the oriented objects in c++
@CodeVault2 жыл бұрын
Yes! I plan on making a large series about OOP
@soufianeamimi2 жыл бұрын
@@CodeVault oooh that would be awsome
@kapellimestari00782 жыл бұрын
very good
@GillesHenrard2 жыл бұрын
Would a "do...while" loop with a flag variable not be cleaner than a full-fledged for loop with a break instruction?
@CodeVault2 жыл бұрын
A bit maybe. You'd still need to have the definition of i, increment and the condition somewhere in that loop. int i = 0; do { // ... } while (i < 3 && strcmp(arr[i], input) != 0); I could be biased but reading a for loop with a break is much easier to understand than a do...while loop that looks like this You can use whichever you feel is right for you though!
@GillesHenrard2 жыл бұрын
@@CodeVault I was more thinking about something like : int i = 0, notfound = 0; do { notfound = strcmp(arr[i], input); i++; } while (i < 3 && notfound); But as you said, except for memory or execution time constraints, only the dev's taste differs :)
@saurabhatre2158 Жыл бұрын
Sir video is helpful but I want to search( 4 ft × 15 inch ,0.9 21) as a whole string to be found can you help me please ( I want to use data structure too but it says _parameter error The current program finds only till 4 ft only 4 digits i want whole string to be searched at once with data structure please see to it and send source code to improve it
@CodeVault Жыл бұрын
There are two options: You can either manually iterate over the string and check if the string is what you're searching for or, use a regex library (if you need to find any number in the string)
@saurabhatre2158 Жыл бұрын
@@CodeVault Sir, thanks for info But please share source code Array a={(4 ft x 15 inch, 0.93,21),(4ft x 15 inch ,0.93,21),(4ft x 12 inch),0.93,21)} Output: (4 ft x 15 inch, 0.93,21) =>2 (4ft x 12 inch),0.93,21) =>1
@k_ushagra2 жыл бұрын
and this is how we know you favourite fruit or colour is Orange.. 😛😜
@shivagthegamer49332 жыл бұрын
Thanks, but I want function of it
@CodeVault2 жыл бұрын
You could copy everything in a function and set the array of strings as parameter and the result as a return