Rules of function, C/C++ Programming

Assignment Help:

Rules of function:

  • Inline function created without prototype it reduces the memory and it is used only for small function. Inline function cannot have recursion, static variable ,goto and switch .
  • Default argument should be specified in the prototype.
  • Function defined below the main program should have a prototype or declaration before calling the function. Where as function declared above require not have prototype.
  • When a function with default argument is known without the argument then that argument gets the default value.
  • Constant argument can also have default value. Default value cannot be modified only inside the function; but any value can be passed to constant argument.
  • Functions without argument and with only one argument as default argument will guide to uncertainty (unclear) for the compiler; therefore the programmer should avoid such type of function declaration.

Class  is  a  fresh  concept  introduced  in  C++.    It  is  the  core  of  objected  oriented programming.                          

Class  is  advanced  extension  of  structure  in  C  language.   The  members  in structure are array and primary data type.  The members can be accessed globally or it can be said they are public members.  Structure serve only limited.  It is primarily used to group a collection of data  and  define  it as a structure. Other than  that  there  is special advantage  of defining  a structure. To overcome these boundaries C++ has introduced a new type of concept called Class.

A class is defined as structure with using key word class.  A class can have primary data types  and  functions  as  its  members. These  members  can be hidden  by making  as  private members.   When the members are not defined public as or private the members take default property as private members.   To make the members public, the word public should be defined inside the class.


Related Discussions:- Rules of function

Assignment, Classify computer systems according to capacity. How they are d...

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

What do you mean by inheritance, Inheritance is the process of forming new ...

Inheritance is the process of forming new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class,

What is some instance of operator overloading?, A: Here are a few of the ma...

A: Here are a few of the many instance of operator overloading: myString + yourString may concatenate two std::string objects myDate++ may increment a Date object a * b may m

What does throw; (with no exception object after the throw , What does thro...

What does throw; (with no exception object after the throw keyword) mean? Where would I employ it? A: You should see code that looks something like this: class MyException

C program for pattern star, 1 PETTERN1 (Pettern1.c)   main() { ...

1 PETTERN1 (Pettern1.c)   main() {           int i,j,k=1,a;           clrscr();           for(i=1;i           {                    if(i>=3)

Prepare an ipad application clash of clans like game, Prepare an iPad appli...

Prepare an iPad application Clash of Clans like game I would like to prepare a free city building app with the in app purchase possibility. An example game could be Clash of Cla

Padovan string, padovan string generation till 40

padovan string generation till 40

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd