Anonymous
Scanf can read only signs until the next space comes.With this function you can read a string with spaces and with *c the newline will be deleted
Example char hello[100]; Input scanf("%s",s); Hello Guys output printf("%s",s); Guys
Anonymous
with this function scanf("%[^\n]%*c", s) Output Hello Guys
Anonymous
you can use gets but its really dangerous because it has Buffer problems and not recommened to use it
Levi
what if we use scanf(%[^\n],s)
Matija
Hi guys, i am new to this ( both c programming and group)😅
Matija
What is the time period i should expect before i get decent at c?
Anonymous
what if we use scanf(%[^\n],s)
Its like read line until \n
Matija
are you a hard working guy ?
I would dedicate 2 hours per day for c.
Anonymous
I would dedicate 2 hours per day for c.
use the ansi c book and your known about c is in c under 2 months finished
Anonymous
c is not complex but you must do many things myself.Like memory allocation.To understand what a pointer do take me 4 months :D
Anonymous
i had an education and know iam studying data science
Levi
3 Years
where should i pratice problems
Anonymous
dont look at youtube Videos.Try to fix your problems with your knowledge you will your brain will works like an Debugger
Anonymous
debugging is really difficult .I got several multiple times aggressive behaviours and kicked my display with my foot :D
Anonymous
where should i pratice problems
the most common Problems are segmentation failures
Levi
ok
Anonymous
Which ide you use ?
Anonymous
Which ide you use ?
vs code and atom
Anonymous
i love vs code solar theme
Anonymous
vs code and atom
atom is nice good one 👍.Perfect ide for students is codeblocks
hamza
vim
Anonymous
My opinion.Visual studio is for me for noobs to complex
Anonymous
turboc++😅
dont use it.Many schools in india use turbo c++ but for my opinion its to old
hamza
something else than just codeblocks
hamza
Dev c++
its just for c++ or for c as well
Anonymous
its just for c++ or for c as well
Bro the gcc compiler its with c code compatible
Anonymous
almost every second c c++ code use gcc
Anonymous
Turbo c is not in the actual forms and looks ugly ass fuck
Anonymous
come on man we are in 2022
Anonymous
but i dont understand something.Why i need in turbo c getch but other ides dont cares that
abababbaba
Vs code is good ide for c c++ or other programming language
Hsn
void foo(); int main(){ void *pFoo = &foo; void *pBar = foo; } is pFoo and pBar identical ? i never used reference operator on functions ..
Hsn
Dev c++
why not borland c++ ?
Levi
why not borland c++ ?
its same as turbo c++
Hsn
ah ok .. joke on me.
Begula
#cbook
Matija
#ide
Anonymous
hey i need an programmer who can make me an programm , i will pay dm!
Ayush
Hello friends 🙋 I have one question to ask if anyone could answer I will be grateful Which one is better to start learning with programming C or C++ Thanks
I use Arch
Hello friends 🙋 I have one question to ask if anyone could answer I will be grateful Which one is better to start learning with programming C or C++ Thanks
In the continuing debate on whether one needs to learn C before C++, I am firmly convinced that it is best to go directly to C++. C++ is safer and more expressive, and it reduces the need to focus on low-level techniques. It is easier for you to learn the trickier parts of C that are needed to compensate for its lack of higher-level facilities after you have been exposed to the common subset of C and C++ and to some of the higher-level techniques supported directly in C++. (C) Bjarne Stroustrup (creator of C++)
Ayush
C
Warmly thank you bro
Hsn
C++ is too complicated in my opinion .. too many hidden traps?
André
C++ is too complicated in my opinion .. too many hidden traps?
All languages i use have "hidden traps", just pick the right tool for the right job
coal
C++ is too complicated in my opinion .. too many hidden traps?
there's no hidden traps when you understand what everything does
Hsn
there's no hidden traps when you understand what everything does
Yeah .. you can even code with assembly and say that sentence ..
Hsn
🤷‍♂️
coal
assembly is simpler than C++
coal
the only complexity in C++ is the fact that there's so many features that learning all of them and all of their uses can take decades of experience or years of study
coal
even Bjarne himself has admitted that within C++ there's a much cleaner language trying to get out
Nameful
Can I somehow wait for a callback to finish in a synchronous function?
Hsn
http://harmful.cat-v.org/software/c++/linus
Nameful
Can I somehow wait for a callback to finish in a synchronous function?
And like only return when the callback calls back
%Nikita
assembly is simpler than C++
Well, yes, but in fact, to program in assembly language, you have to be very well versed in hardware
%Nikita
But it is syntax simpler
Hsn
Idk if traps is bad choice of word .. i guess my point still valid .. c++ hides some foundamentals about memory that i like and grasp easier in c ..
coal
but the barebones, shouldn't take you too long to learn
%Nikita
but the barebones, shouldn't take you too long to learn
I agree, it is very good to learn asm to understand how hardware is fundamentally work
coal
Idk if traps is bad choice of word .. i guess my point still valid .. c++ hides some foundamentals about memory that i like and grasp easier in c ..
C++ manages memory in a much more implicit way than C, but it's still cleaner from the programmer's perspective
Hsn
People dont program in asm unless they need to.. its Tricky and waste of time..
coal
in fact you don't ever need to use malloc in C++
coal
there's no point in using malloc, except for when you want to reallocate