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

Which steps are required to add a column to a list view?

2 Answers  


Difference between getmessage, postmessage & peakmessage.

0 Answers  


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

2 Answers  


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

0 Answers  


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

0 Answers  






What is microsoft visual c++ runtime library error?

0 Answers  


What is an overlapped image?

1 Answers  


What is iunknown?

0 Answers  


Is visual c++ a compiler?

0 Answers  


TO start the build process in Developer Studio Which keyboard function is used ?

4 Answers  


What are the two forms of the #include preprocessor directive?

1 Answers  


How a dll will be sharable by more than one exe?

4 Answers   CA,


Categories