%p
Category: Programming
ascii codes
‘n’
Precedence in C
!, > , < ... the expression i+++j is treated as (i++ + j) i++ + ++i
Representation of negative numbers
main(){ printf(“%x”,-1
extern, static variables, enum, register
Static variable When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can beContinue reading… extern, static variables, enum, register
Complete binary tree and Full binary tree
Full and Complete binary trees are different. All full binary trees are complete binary trees but not vice versa. Full binary tree needs 2^n-1 nodes
Redefining inbuilt data types
#include typedef int INTEGER /* will work */ But #define INTEGER int /* will also work*/ INTEGER SomeFunction() { …… code return 0; } This will work But Rule of thumb is #defines are used for textual replacement whereas typedefsContinue reading… Redefining inbuilt data types
sizeof operator
sizeof(‘a’) = 4
Index into arrays
main () {
Function pointers, static char
typedef int abc (int a, char *b); int func2 (int a, char *b){