String endswith() Method | Python Tutorial

String endswith() Method | Python Tutorial

Portfolio Courses

1 год назад

2,185 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Yoruichi
Yoruichi - 05.01.2023 23:54

Shameless question:
Any similar channel but for Java you recommend?

Ответить
Војин Кузмановић
Војин Кузмановић - 05.01.2023 21:36

Hi, could you please explain how does a C compiler distinguish for example int*(for arrays) and int* (for ints) when passing it into a function?
Also i have a simmilar problem regarding structs:

struct test{
int foo;
int bar;
};

struct test1{
struct test* foo; //a struct test pointer variable
int bar;
};
int main()
{
struct test array[5]; //declaring an array of structs of type test
struct test1 structure; //declaring a test1 struct
struct test1 *pointer = &structure; //declaring a pointer to store the adress of the structure struct
pointer -> foo = array; //setting the "foo" pointer(line 10) to the adress of the first member of the array[5] array structures



pointer -> foo[1].bar = 99; //setting the foo variable of the first member of the test array[5] at line 15
pointer -> foo -> bar = 21; //setting the first member to the value 21
}

Why is "pointer->foo[1].bar = 99" assignable, why do we use the dot operator if struct test* foo is a pointer to a struct??
I assumed that the angle brackets dereference the pointer but why then "pointer-> (foo + 1) -> bar = 99" is not assignable??

Sorry if these questions are not connected to this Python video but i did not find another way to contact you so if you could explain this via a video or a reply here i would be grateful. thanks

Ответить
Poison Modz
Poison Modz - 05.01.2023 08:23

Good 😊

Ответить
Rama Krishna
Rama Krishna - 05.01.2023 07:41

Hi sir wonderful explanation
I have doubt in Python why | a += b is not always a = a + b .. can you do a video on this topic why it's not same always ...thank you..

Ответить