Tuesday, 19 February 2013

realloc()

The following example illustrates the use of calloc() function in C.

The following example illustrates the use of malloc() function in C.

Dynamic Memory allocation

Monday, 18 February 2013

Is main() user defined function or pre-defined function?????

The main function is a user implemented function whose prototype is pre -defined by compilers (known as implementations in the C standard) and used as the entry point of a C program, as per ISO/IEC 9899:TC2 Section 5.1.2.2.1:

The function called at program startup is named main. The implementation declares no prototype for this function. it shall be defined  with a return type of int and with no parameters

int main(void) { /* ... */ }

or with two parameters (referred to here as argc and argv, though any names maybe used, as they are local to the function in which they are declared):

int main(int argc, char *argv[]) { /* ... */ }

or equivalent; or in some other implementation-defined manner.

The reason why it is prototyped by the compiler is simple: the compiler needs to know where to start so it can emit a proper executable that can be run. (Of course, if you are writing a library, it is perfectly fine to not have a main function - and in fact you shouldn't have one).

Thursday, 6 December 2012

Ubuntu shortcut keys

General keyboard shortcutsCtrl + A = Select all
Ctrl + C = Copy the highlighted content to clipboard
Ctrl + V = Paste the clipboard content
Ctrl + N = New (Create a new document, not in terminal)
Ctrl + O = Open a document
Ctrl + S = Save the current document
Ctrl + P = Print the current document
Ctrl + W = Close the close document
Ctrl + Q = Quit the current applicationKeyboard shortcuts for GNOME desktopCtrl + Alt + F1 = Switch to the first virtual terminal
Ctrl + Alt + F2(F3)(F4)(F5)(F6) = Select the different virtual terminals
Ctrl + Alt + F7 = Restore back to the current terminal session with X
Ctrl + Alt + Backspace = Restart GNOME
Alt + Tab = Switch between open programs
Ctrl + Alt + L = Lock the screen.
Alt + F1 = opens the Applications menu
Alt + F2 = opens the Run Application dialog box.
Alt + F3 = opens the Deskbar Applet
Alt + F4 = closes the current window.
Alt + F5 = unmaximizes the current window
Alt + F7 = move the current window
Alt + F8 = resizes the current window.
Alt + F9 = minimizes the current window.
Alt + F10 = maximizes the current window
Alt + Space = opens the window menu.
Ctrl + Alt + + = Switch to next X resolution
Ctrl + Alt + - = Switch to previous X resolution
Ctrl + Alt + Left/Right = move to the next/previous workspaceKeyboard shortcuts for TerminalCtrl + A = Move cursor to beginning of line
Ctrl + E = Move cursor to end of line
Ctrl + C = kills the current process.
Ctrl + Z = sends the current process to the background.
Ctrl + D = logs you out.
Ctrl + R = finds the last command matching the entered letters.
Enter a letter, followed by Tab + Tab = lists the available commands beginning with those letters.
Ctrl + U = deletes the current line.
Ctrl + K = deletes the command from the cursor right.
Ctrl + W = deletes the word before the cursor.
Ctrl + L = clears the terminal output
Shift + Ctrl + C = copy the highlighted command to the clipboard.
Shift + Ctrl + V (or Shift + Insert) = pastes the contents of the clipboard.
Alt + F = moves forward one word.
Alt + B = moves backward one word
Arrow Up/Down = browse command history
Shift + PageUp / PageDown = Scroll terminal outputKeyboard shortcuts for CompizAlt + Tab = switch between open windows
Win + Tab = switch between open windows with Shift Switcher or Ring Switcher effect
Win + E = Expo, show all workspace
Ctrl + Alt + Down = Film Effect
Ctrl + Alt + Left mouse button = Rotate Desktop Cube
Alt + Shift + Up = Scale Windows
Ctrl + Alt + D = Show Desktop
Win + Left mouse button = take screenshot on selected area
Win + Mousewheel = Zoom In/Out
Alt + Mousewheel = Transparent Window
Alt + F8 = Resize Window
Alt + F7 = Move Window
Win + P = Add Helper
F9 = show widget layer
Shift + F9 = show water effects
Win + Shift + Left mouse button = Fire Effects
Win + Shift + C = Clear Fire Effects
Win + Left mouse button = Annotate: Draw
Win + 1 = Start annotation
Win + 3 = End annotation
Win + S = selects windows for grouping
Win + T = Group Windows together
Win + U = Ungroup Windows
Win + Left/Right = Flip WindowsKeyboard shortcut for NautilusShift + Ctrl + N = Create New Folder
Ctrl + T = Delete selected file(s) to trash
Alt + ENTER = Show File/Folder Properties
Ctrl + 1 = Toggle View As Icons
Ctrl + 2 = Toggle View As List
Shift + Right = Open Directory (Only in List View)
Shift + Left = Close Directory (Only in List View)
Ctrl + S = Select Pattern
F2 = Rename File
Ctrl + A = Select all files and folders
Ctrl + W = Close Window
Ctrl + Shift + W = Close All Nautilus Windows
Ctrl + R = Reload Nautilus Window
Alt + Up = Open parent directory
Alt + Left = Back
Alt + Right = Forward
Alt + Home = go to Home folder
Ctrl + L = go to location bar
F9 = Show sidepane
Ctrl + H = Show Hidden Files
Ctrl + + = Zoom In
Ctrl + - = Zoom Out

PHOTOSHOP CS5

http://www.mediafire.com/?g21bcn9ftuvx2jt

Learn the photoshop by yourself.