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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / guest

for giving a comma operator

Is This Answer Correct ?    4 Yes 0 No

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

Answer / suganthi

for giving a comma operator

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More VC++ AllOther Interview Questions

Is visual c++ still used?

0 Answers  


Is it safe to uninstall microsoft visual c++ 2008 redistributable?

0 Answers  


What is the default label used for in a switch statement?

2 Answers  


What is microsoft visual c++ 2010 x86 redistributable?

0 Answers  


Can I uninstall visual c++ 2005?

0 Answers  






What is iunknown? Explain some of commonly used methods provided by iunknown.

0 Answers  


What is the difference between the cout and cin iostream objects?

7 Answers  


I have to DLL one is COM dll and another is normal DLL. How I can identify which dll is normal DLL and which DLL is from COM DLL. please give me some clear picture on these

2 Answers  


What is vcredist?

0 Answers  


How to Use mfc71d.dll not mfc71.dll ?

1 Answers  


What is visual c++ redistributable?

0 Answers  


How do I uninstall visual c++?

0 Answers  


Categories