aguea asia
Learning to code
@NoobCoderr
First steps in programming
Joined December 2013
Tweets
27
Following
4
Followers
8
Likes
0
Photos and videos
Photos and videos
Tweets
Learning to code
@NoobCoderr
7 Nov 2014
Hexadecimal integer literals start with 0x in C and C and 0xDEADBEEF is a valid hexadecinal integer literal.
Learning to code
@NoobCoderr
9 Apr 2014
Null-terminated string is a character array whose last character is zero.
Learning to code
@NoobCoderr
26 Dec 2013
Actually you should use int8_t for numbers between -128 and 127 instead of char in C .
Learning to code
@NoobCoderr
26 Dec 2013
&& is a logical AND, but & is a bitwise AND. a && b returns 1 if a and b ar greater than 0, but a & b returns a number with AND-ed bits.
Learning to code
@NoobCoderr
26 Dec 2013
If n is not equal to 0 and (n-1)&n is equal to 0 (it has exactly one 1-bit), it is a power-of-two number. Full formula: n!=0 && (n-1)&n==0
Learning to code
@NoobCoderr
26 Dec 2013
Name mangling is used to "store" C function names is executables.
Learning to code
@NoobCoderr
26 Dec 2013
@19k86x
@Yanthir
follow me! I will teach you programming :)
Learning to code
@NoobCoderr
18 Dec 2013
long is 4 bytes on Windows, but 8 bytes on *NIX systems. To get 8 bytes on Windows, you have to write long long.
Learning to code
@NoobCoderr
18 Dec 2013
"for" loop can be actually written like this "for(;;)" and it is the same as "while(true)".
Learning to code
@NoobCoderr
17 Dec 2013
Did you know that somePointer[3] and somePointer 3 and 3[somePointer] are the same in C?
2
1
Learning to code
@NoobCoderr
16 Dec 2013
const int a = 10; means that you can not change the value of a.
Learning to code
@NoobCoderr
16 Dec 2013
A linked list is a list in which every element stores a reference to other (linked) element(s).
Learning to code
@NoobCoderr
16 Dec 2013
Scope is everything between {}. Variables declared in a scope are erased at the end of the scope. They are somehow popped from the stack.
Learning to code
@NoobCoderr
15 Dec 2013
Didn't know that if you call new int[10], then you have to call delete [] to release it. This caused me a lot of memory leaks.
Learning to code
@NoobCoderr
15 Dec 2013
In C you allocate memory with malloc, but in C with the new operator. You have to release memory with free and delete respectively.
Learning to code
@NoobCoderr
14 Dec 2013
Actually I could also use C cast like so "int foo = static_cast<int>(4.6f)"
Learning to code
@NoobCoderr
14 Dec 2013
"(int)4.6f" is a C-style explicit cast, but "int foo = 4.6f" has an implicit cast to int. Interesting...
1
Learning to code
@NoobCoderr
12 Dec 2013
Hmm, a function that calls itself is a recursion.
Learning to code
@NoobCoderr
12 Dec 2013
"int foo(char bar);" is a declaration of a function that has parameter of type char and returns int.
Learning to code
@NoobCoderr
11 Dec 2013
"using namespace std;" lets me write "string" instead of "std::string"!
Load more