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

How can we allow no selection of radio button in grouped radio buttons?

2 Answers  


Explain pointer to the constant and constant pointer?

0 Answers  


What is vcredist?

0 Answers  


How can i communicate with two systems one is located some place another is located 100km how from the current systems which protocala i have to use

2 Answers   Invensys,


What is cwinthread class? Explain its advantages.

0 Answers  






What is cmutex?

0 Answers  


What is a mnemonic?

1 Answers  


Difference between critical section, mutex and semaphore.

0 Answers  


What function is used to trap all mouse messages?

1 Answers  


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

0 Answers  


Can I uninstall visual c++ 2005?

0 Answers  


What is splitter window in vc++?

0 Answers  


Categories