How to declare more than one variable on a single line?

Answer Posted / n

To declare multiple variables of same datatype use comma.
eg. int n1, n2, n3;
To declare variables of different datatype on a single line
use semicolon.
eg. int n; char ch; float f;

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a DLL in C++.net 2005 which we can use in VB 6.0 application ?

1762


What is microsoft visual c++ 2015 redistributable package x64?

562


Explain the important features of vc++?

606


What is mfc in vc++?

723


What is microsoft visual c++ runtime library error?

555






How can we use cmutex?

565


What is visual c++ runtime error?

604


Explain some of commonly used methods provided by iunknown.

517


Do you need microsoft visual c++?

615


How do I uninstall and reinstall microsoft visual c++ runtime libraries?

573


How do I reinstall microsoft visual c++?

529


What is microsoft visual c++ 2015 redistributable?

599


What is microsoft visual c++ 2005 redistributable?

587


Do I need microsoft visual c++ 2005 redistributable on my computer?

656


Explain pointer to the constant and constant pointer? Explain difference between them.

689