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 do I get rid of microsoft visual c++ runtime library error?

671


What is difference between c++ and vc++?

699


What is the use of microsoft visual c++ 2015 redistributable?

525


What is vc++ programming?

690


Is it ok to uninstall microsoft visual c++?

595






What is the difference between turbo c++ and visual c++?

534


What is a copy constructor? What is the need for it?

579


What is visual c++ runtime error?

603


difference between assert and verify.

592


Explain some of commonly used methods provided by iunknown.

515


What is difference between c++ and visual c++?

554


What is microsoft visual c++ 2015 redistributable?

599


How do I reinstall visual c++ on windows 10?

547


Does visual c++ 2017 replace 2015?

589


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

1760