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

State two differences between C and C++.

0 Answers   Hexaware,


What is a manipulator in c++?

0 Answers  


Should I learn c++ c?

0 Answers  


Explain how a pointer to function can be declared in C++?

0 Answers  


Explain one method to process an entire string as one unit?

0 Answers  


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

0 Answers  


Is java easier than c++?

0 Answers  


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

0 Answers  


what is Member Functions in Classes?

0 Answers  


Which field is used in c++?

0 Answers  


Copy Linked List using recursive function?

2 Answers   Persistent,


What are the different types of Storage classes?

5 Answers  


Categories