can anybody please tell me how to write a program in
c++,without using semicolon(;)

Answers were Sorted based on User's Feedback



can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / jasbir singh

void main()
{
if(0)
{

}
}

if you use void with main function, you have no need to
return a value.

Is This Answer Correct ?    16 Yes 4 No

can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / sanjay singh

void main()
{

if(printf("i can try to write ... "))
{
}
}

Is This Answer Correct ?    16 Yes 6 No

can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / anonymous

#include<iostream.h>
void main()
{
}

/*this is also a c++ prog.it is never said dat main body
cannot be empty*/

Is This Answer Correct ?    8 Yes 2 No

can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / ck giri from biratnagar

#include<iostream.h>
void main()
{
while(0)
{}
}

Is This Answer Correct ?    6 Yes 1 No

can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / rayn

#define SEMICOLON ;

int main()
{
cout << "Hello World!\n" SEMICOLON
return 0 SEMICOLON
}

Is This Answer Correct ?    1 Yes 2 No

can anybody please tell me how to write a program in c++,without using semicolon(;)..

Answer / amit

int main()
{

if(printf("can anybody tell me how to write "))
{
}
return 0;
}

Is This Answer Correct ?    3 Yes 22 No

Post New Answer

More C++ General Interview Questions

Explain virtual class and friend class.

0 Answers  


How are the features of c++ different from c?

0 Answers  


Which format specifier is used for printing a pointer value?

0 Answers  


What are destructors?

0 Answers  


Write a program and call it sortcheck.cpp which receives 10 numbers from input and checks whether these numbers are in ascending order or not. You are not allowed to use arrays. You should not define more than three variables

2 Answers   BirlaSoft, Crayonz,






Explain all the C++ concepts using examples.

0 Answers   InterGraph,


How do you find out if a linked-list has an end?

0 Answers  


Why do we use double in c++?

0 Answers  


What is meant by entry controlled loop? What all C++ loops are exit controlled?

0 Answers   TCS,


When are exception objects created?

0 Answers  


What is a static member?

0 Answers  


What character terminates all character array strings a) b) . c) END

0 Answers  


Categories