How To Return A String From A Function | C Programming Tutorial

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thanks for always making these videos clear bro!

dev_ression
Автор

Got my daily C in, thanks, for the info on the basics!

juanmacias
Автор

@12:25 when I call free after DMA, it gives me this error:

free(): invalid pointer
Aborted

why does your works and mine doesn't?

awekeningbro
Автор

Which IDE are using? Am a beginner in this, ,

kennedymunyao
Автор

I am not proud to have developed a different method that can return the string from the scope of the called function.
It can work but it's IOCCC-level hackery...
and it requires some asm to mess with the stack.
hugh.

yxyk-fr
Автор

hi sir, can you make a video explaining how to reverse an array in a function, using recursion

mauricioyepez
Автор

It seems there is no perfect means to return a string. Rather there are better means or more appropriate means than others, and the programmer has to know the drawbacks and compensate for them.

Mnogojazyk
Автор

Where did you ever get car array from Character array? It is not a car array. Never ever heard of chars called cars.

tnhkzmfreedom
Автор

TestFunctionPointer(20395, 0x205192600) malloc: *** error for object 0x104df3f40: pointer being freed was not allocated
TestFunctionPointer(20395, 0x205192600) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort

I am getting this error for dynamic allocation of string within a function
what needs to be done

I am freeing the allocated memory in main function only

sukshithshetty
join shbcf.ru