Strpbrk and strspn in C

  Рет қаралды 4,710

CodeVault

CodeVault

Күн бұрын

Check out our Discord server: / discord

Пікірлер: 13
@tpu124
@tpu124 4 жыл бұрын
Thanks...it is so useful if you code in C++/C dealing with those string inputs...
@rajthakrar2291
@rajthakrar2291 2 жыл бұрын
69th like :) Thanks for the video bdw!!
@jabuci
@jabuci 4 жыл бұрын
Thanks! Never heard of these functions... but they seem useful!
@bushraw66
@bushraw66 2 жыл бұрын
hi , thank you very much for this video but I have a question , why did we use a loop for strspn? for other functions like strchar or strrchar we didn't. And the function it self went through characters one by one, so when do we know which one of them we use a loop in and which one we don't???
@CodeVault
@CodeVault 2 жыл бұрын
You can use strspn outside a loop as well. The idea is we needed the number of digits in that loop to print character by character. It's just for this specific use case
@shubh-kr
@shubh-kr 4 жыл бұрын
So you do make videos, especially for C language?
@CodeVault
@CodeVault 4 жыл бұрын
There are some videos on JavaScript too. Expect some more on web development as well!
@Greg0ryful1
@Greg0ryful1 4 жыл бұрын
Why str + i ends up storing “25 years old” in age? I got a little confused.
@CodeVault
@CodeVault 4 жыл бұрын
It's because str[i] is a digit, namely, the first digit encountered in the string. str[i] is the same as *(str + i) which dereferences the char at address str + i Thus, str + i must be the string that starts at the first digit of the initial string (str). Both str and age point to the same string, except, age is a bit further along.
@Greg0ryful1
@Greg0ryful1 4 жыл бұрын
@@CodeVault I got it know! Thanks.
@taherrezzag9848
@taherrezzag9848 4 жыл бұрын
hi thanks for the video i want to ask you how yo delete a line in file in c
@CodeVault
@CodeVault 4 жыл бұрын
I will look into it
Concatenating strings in C
10:57
CodeVault
Рет қаралды 19 М.
How to parse and validate a number in C
10:16
CodeVault
Рет қаралды 7 М.
Kluster Duo #настольныеигры #boardgames #игры #games #настолки #настольные_игры
00:47
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,6 МЛН
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 314 М.
Pointer assignment vs strcpy in C
13:19
CodeVault
Рет қаралды 5 М.
What is %n in printf and scanf?
7:41
CodeVault
Рет қаралды 4,4 М.
Why Function Pointers are Awesome
11:11
Jacob Beningo
Рет қаралды 8 М.
Checked vs. Unchecked Exceptions in Java Tutorial - What's The Difference?
10:14
How to return and pass a struct to a function
13:30
CodeVault
Рет қаралды 30 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 796 М.
you will never ask about pointers again after watching this video
8:03