Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
when a class is defined the compiler will not allocate memorythis is true only for data member not for member function as soon as the member
arrays within a classit is just declaring or constructing a derived type array inside the class it works similarto regular arrayconst int
private member functionsa private member functions can be called by the members of the same class consider the following example class sample
specifying a classas discussed a class is defined to develop an algorithm and bind it together in a core shella class is an abstract data type adt
rules of function inline function created without prototype it reduces the memory and it is used only for small function inline function cannot have
function overloadingfunctions can be defined with same name depending upon the type of argument passedthe function will perform this is known
define constant argumentthe argument can be a constant argument the constant variable cannot be changed inside the function definition
default argumentwhen the argument is missing then the function will read the default value of the missingargument to make use of default argument
inline functionit is a function without prototype the function is defined above main the function should be declared above main
return by referencethe return value of the function must be an address variable in following program thefunction returns the value of x or y and
call by referencearguments to a function can be passed in two way one by call by value and other by callby reference call by value is passed
define function there are two types of function built-in functions and user-defined functions built-in functions are the function
control structuresit is of three types1 sequence structure2 loop or iteration or repetition structure3 selection
operator precedence and associativelythe operator precedence and its associativity is similar to c x ab cdethe first operation is de the second
operator overloadingwhen an operator is used for different operations such process is called
expression and their typesan expression will be in form of mathematical expression with c syntax embeddedwith it expressions are of following types
what is type cast operator the float can be converted to integer value or an integer can be converted to float value using type cast
memory management operatorin c malloc calloc realloc and free are used to mange dynamic memory inaddition to these function c have derived
member dereferencing operatorsthese operators will be discussed later pointer to member decelerator-gt pointer to member operator pointer to member
scope resolution operatorthe scope resolution operator is used to access global variable in the inner block when global and local variable are
operators in call c operators are valid operators in c also besides c has developed some new operators likeoperators and their
declaration of variablesvariables are declared as followsint afloat b assigning value to variablesint a 100 declaring and assigning is called
define type compatibilityto assign int to small int the variable should be converted using type
symbolic constantconst max 100 the default data type will be integerconst int max 100 enum dept cse104eee105ece-106 it
derived data typearray is derived data type to store large collection of data of only one data typeint mark100char names25function will be discussed