Linux Tips

Changing Linux root password

Ways of saying ‘Hello! World’ :

– sizeof (type) requires parenthese, while sizeof expression
does not.

– How to easily read a declaration from left to right:
transform function argument types from inside out first
move the base type to the end
add outer parentheses if there’s an initial *
change every (*…) to … ->
one -> for each *
move qualifiers, so * const becomes const ->

Example: const int *(**const x [])()

*(**const x [])() const int base type to end
(*(**const x [])()) const int add outer parens
(**const x [])() -> const int remove outer ()
x [] const -> -> () -> const int remove inner ()

array of constant pointers to pointers to functions
returning pointers to constant ints

– p + 1 == &p [1]

  One thought on “Linux Tips

  1. May 30, 2009 at 8:34 AM

    >When you talked about sizeof, here is what I understand. sizeof is an operator and the parenthesis following sizeof does not denote function. Parenthesis is to evaluate the expression.In other words, parenthesis is not part of sizeof operator, but part of expression whose size is returned.This is similar to ‘return’ statement at end of any function. It may or may not have parenthesis after it.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: