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 linked list using c++ with an example?

0 Answers  


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

0 Answers  


Do you need a main function in c++?

0 Answers  


What is the use of dot in c++?

0 Answers  


What is a storage class? Mention the storage classes in c++.

0 Answers  






sir there is some problem with nokia5130c-2,when we are trying to upload movies from net then there is a error occurred"FORMAT NOT SUPPORTED" bt its all ready in 3gp format.please tell me what i do now?

2 Answers   Nokia,


How do c++ struct differs from the c++ class?

0 Answers  


Is std :: string immutable?

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


What are the characteristics of friend functions?

0 Answers  


3- Write a program to find larger and smaller of the two numbers.

4 Answers   Luminous,


What is else syntax in c++?

0 Answers  


Categories