Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

C Language

Loading...

Published in: C / C++
1,101 Views

Simplified Concepts And Implementation of C.

Suman / Gurgaon

6 years of teaching experience

Qualification: B.Tech

Teaches: Computer, IT, C / C++, Java And J2EE, Python Programming, MCA Subjects, Networking, Software Testing, Unix/Linux

Contact this Tutor
  1. Preprocessing : Compilation Phases: 1) Preprocessing 2) Core compilation 3) Linking Preprocessor Preprocessor : text cpp core compiler C oriented processing 1) Including files 2) Macros processing #include #define for defining, invocation of fmacros 3) Some specific text processing #include Content of stdio.h get inserted into your sorice code. /usr/include #include /usr/include does not have it #include "myproj . h" 1) The directory in which the file that included myproj . h is preset. 2) If not found the directories corresponding to . will ce searched version for project specific headers. Use Use < > version for system header files. Project specific directories: / home/ user 1/ project/headerfiles cc -I / home/ user 1/ project/ headerfiles 1) Removes newlines immediately preceeded by a \ 2) Removes comments- replaces by a single space 3) Concatenates adjacent const string (literals) that separated by white space compare functions & macros avoiding repeated includes int sqr(int x); #define SQR(X) (X)
  2. 1) Macros replaced in preprocessing if macro invokded at 10 places, there will code duplicated at 10 places. no stack frame With functions, definition at one and only place Control jumps to area of definition Stack frame are created Efficiency in execution time Macro is always faster Size of the executbale file: functions produce less volume of exe code. 2) Functions have theri own scope rules: for local variables block scope Macros have no such new scope 3) If side effect operators are used with macro, multiple times this effect can be felt. SQR( ++1) i incremented once i incremented twice 4) Address of a function is well defined no address for macros.. 5) # operator allows Name of teh parameter to be printed/ accessed with macros. . No such thing possible with funcitons 1) 2) 3) 4) 5) Emp name Emp id Dept Salary Manager id min chars 19 int type-- Val U eS min char 11 Float should be one of the existing emp ids First record allows a relaxed manager id
  3. N/A