klimi
Dima
if you want to know better about memory alignment, low level stuff then C
Dima
c++ has higher abstraction and oop
Anonymous
usually you should not use restrict keyword; it is for optimization only.
there are 2 types of functions declared in string.h header:
str functions,
mem functions.
str functions will operate on \0 terminated memories, mem functions will operate on fixed size memories.
strncpy(a, b, n) = copy until \0 at most n characters
memcpy(a, b, n) = copy exactly n bytes
“👨🏻💻” Ahmed;
klimi
“👨🏻💻” Ahmed;
Programming
“👨🏻💻” Ahmed;
To understand how OS work
Dima
then C
“👨🏻💻” Ahmed;
Ok thanks ❤️
Darknez
Low level memory and register modifications can be done by c?
Asdew
Memory? Yes. Register modifications? Assuming you mean actual processor registers, no.
Darknez
I meant storing and retrieving stuff
Darknez
Moreover any suggestions for learning pointers ?
Asdew
Darknez
Like bits or doing operations
Darknez
Asdew
Am I the only one who doesn't understand him?
Darknez
Ok like say I want to add two 4 bit numbers
Asdew
And?
Darknez
Store summation back into memory
Asdew
int a = 7 + 2;
Asdew
Just normal addition.
Darknez
But I think if I consider each bit into a register
Darknez
And then do the addition
Asdew
?????
Asdew
I'd love some help here with him.
Asdew
@Darknez, can you give an example in some other programming language?
Darknez
Let's see assembly I guess
Darknez
Probably using c for assembly code
Asdew
x86?
Darknez
Yes
Asdew
Okay, I'm fine with both Intel and AT&T.
Darknez
Asdew
You can forward messages.
Darknez
Asdew
How long will the example take for you to send it?
Darknez
Ohh yeah that I ain't on my pc rn
Asdew
I need to go to sleep, I hope someone who understands you can help you.
Adelmo
Hi
Adelmo
can someone recommend a good book to learn C?
klimi
I think something is in notes
klimi
/saved
klimi
#cbook
Anonymous
#rules
Anonymous
Hey guys, I'm getting this error "const char *" is incompatible with parameter of type "char *".
E0167
I get this error on drawstrin(),printMessage() etc basically everywhere where there's a string.
Is there something wrong with my setup?
Can someone please tell me what I'm doing wrong here?
Anonymous
Anonymous
Input : hey
Anonymous
change e to f
Anonymous
output : hfy
Anonymous
but this code not working please help
Anonymous
heyyy??
Adelmo
thanks
Dima
heyyy??
what’s your current output?
Anonymous
it freeze not taking 3rd input
Dima
Dima
instead of gets
Anonymous
Can someone tell me what's wrong here?
Dima
and read the rules please, posting a screenshot is much better
Anonymous
Dima
or probably that method does not exist in cxx file, only in h definition
Anonymous
use fscanf
not woking even it stopped taking 2nd input
Dima
how do you use it?
Anonymous
Dima
perhaps you need to wrap it into extern “C” { } but I am not sure If am right
Dima
there can be several reasons
Anonymous
there can be several reasons
is my setup causing problems? should I try running this on another version of VS or reinstall VS? will that help?
Dima
nope, I am talking about code and linking
Anonymous
Anonymous
Dima
remove every gets method call and replace everything with
fscanf(stdin, “%s”, ....);
Dima
fscanf is safer than scanf
Dima
you could use c++ and just call std::cin
Anonymous
MALIK AMIR
MALIK AMIR
MALIK AMIR
Someone please share some commands I'm beginner?