New course!
Every coder should learn
Generative AI!
Try a free lesson
Courses
Courses
Code Compiler
Code Compiler
Discuss
Get Pro
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
When to use 1 int main() 2 void main() 3 main ()
c#
0 Votes
3 Answers
3rd Oct 2016, 9:52 AM
Raj shah
#include<stdio.h> int main() { printf("%x", -1<<1); getchar(); return 0; }
code
logic
output
7 Votes
9 Answers
25th Dec 2018, 10:22 AM
Vinayak Irabatti
Why r u not accepting void main() instead of int main() ?
c++
1 Vote
2 Answers
15th Dec 2016, 6:29 PM
Hiranmayi
no return type in main()
c++
templates
1 Vote
3 Answers
1st Nov 2016, 2:12 PM
Mohi
what is the role of main() in cpp?
main()
3 Votes
3 Answers
15th Aug 2020, 2:38 PM
Abhishek Kumar
char datatype inside int main() function
c
main
1 Vote
3 Answers
24th Feb 2020, 10:39 AM
Reiner
Can main() be overloaded in Java?
java
1 Vote
4 Answers
2nd Sep 2018, 1:07 PM
saurabh sable
Hello everyone please help this question? function main() { var distance = parseInt(readLine(), 10);
js
0 Votes
12 Answers
2nd Jan 2021, 1:35 AM
MK GALAXY
We can't use void main() in c++ right? We should only use int main() right?
c++
in
void
0 Votes
2 Answers
1st Aug 2019, 5:16 PM
Merlyn J
int main() { cout<<(1&&45||0); }
namratha
0 Votes
1 Answer
31st Oct 2019, 4:40 PM
Ashish kumar
Int main() int a=5 Int b=++a*a++ Print(%d,b)
c++
increment
operators
0 Votes
8 Answers
6th Jun 2017, 3:34 PM
Nitish Kulkarni
Why we use int main() in C++
c++
function
main
0 Votes
5 Answers
25th Oct 2020, 7:36 AM
SAADAT ALI
please what will i write main()
cout
main()
0 Votes
3 Answers
30th Nov 2018, 8:09 PM
umar muhd ladan
How can I redifine int main()
c++
0 Votes
2 Answers
14th Dec 2022, 7:20 AM
Abigail Augustine
[Question] Reason for void() and main() [Solved]
c++
3 Votes
4 Answers
24th Jan 2022, 1:59 PM
•Đคяк รтяεคм 𝅘𝅥𝅮 ᴺ•ᵀ•ᴬˢᵘʳᵃᵖᵖᵘˡᶦ
Can't I use int main() in java?
int
java
main
5 Votes
2 Answers
2nd Dec 2019, 12:57 PM
Aditya
error about main() in playground console
c++
cout
1 Vote
4 Answers
13th Apr 2017, 3:47 AM
Chain Leang
Cant we write char main() {}
magic-methods
1 Vote
2 Answers
17th Oct 2018, 7:18 AM
Dhananjay
What is the purpose of int main() in C++
c++
functions
int
main
13 Votes
4 Answers
28th Dec 2016, 10:56 AM
Gami
#include<stdio.h> int main() { int a=1; printf("%d%d%d",a++,++a,a); return 0; }
c
0 Votes
14 Answers
9th Jul 2017, 10:12 AM
RAHUL
Can we Execute Java program without main() Method?
java
main()
1 Vote
5 Answers
7th Sep 2018, 6:13 PM
Slim Jxmmi
Why do we need main() function?
java
1 Vote
3 Answers
25th May 2017, 12:23 PM
Harsh Priyadarshi
Why we use int main()
c++
0 Votes
2 Answers
7th Jan 2018, 4:18 PM
Shërîl Kìrü
What is redefinition int main() in C++
namespace
0 Votes
3 Answers
24th Nov 2021, 12:40 PM
Nidhi Agrahari
Can we use final keyword with main() method?
final
java
main
method
3 Votes
3 Answers
19th May 2019, 3:54 PM
Vaishnavi Rajkumar Pawar
hey we can use void main() in place of int main() right? what's the difference? #needhelp
c++
variables
2 Votes
3 Answers
2nd Jul 2016, 2:48 PM
Bhavin Bopanna
What is the difference between int main () and void main()
c
c++
6 Votes
11 Answers
22nd Mar 2019, 8:15 AM
Emmanuel Godwin
What Is the use of int main()
c++
2 Votes
4 Answers
14th Apr 2017, 1:27 PM
Vishwas Mishra
why "main()" must in every java programm? i had run java program without main() by using static method only...
main()
withoutmain
0 Votes
22 Answers
8th Jun 2019, 4:47 AM
kamlesh patil
When I use void main(){ instead of int main()
c
1 Vote
7 Answers
15th Oct 2020, 4:59 AM
Nafis Sadiq Bhuyan
Is main() a user-defined function or a predefined function ?
c
c++
java
3 Votes
9 Answers
14th Sep 2019, 9:24 AM
Sayan Mukherjee
Int Main() = void main(void) ?
c++
main
void
1 Vote
2 Answers
21st Feb 2017, 6:28 PM
Viktor Medvedev
C/C++: Why doesn't int main() cause an error when I provide command line arguments?
arguments
c
c++
command
line
20 Votes
12 Answers
9th Feb 2019, 11:43 AM
Anna
Why is main() function is too important in c ?Why we use it? Working of main() function
c
cprogramming
0 Votes
2 Answers
10th Aug 2022, 1:11 PM
Suraj Joshi
What is the difference between private static void Main() and public static void Main() in c# and JAVA?
access-modifiers
c#
java
main-methode
2 Votes
2 Answers
1st Jun 2018, 7:03 AM
Nurman Tajir
What's the difference between void main() and int main()?
c#
variables
5 Votes
8 Answers
1st May 2017, 6:10 PM
Bana Itan
why when I write: #include <iostream> using namespace std; int main() { cout <<"Hello world!"; return 0 } int main() { ----It says ERROR
c++
cout
0 Votes
21 Answers
28th Jun 2016, 6:47 AM
L-ka
C program to print line number of main()
c
programming
3 Votes
4 Answers
21st Jan 2018, 8:44 PM
Basu
without using main() program compile or not??
c++
1 Vote
3 Answers
6th Feb 2017, 1:40 PM
Mayur Chaudhari
Why main() can't return any value?
main
return
0 Votes
2 Answers
23rd Dec 2016, 2:07 AM
vivek kumar choubey
Calling an object's method outside of Main()
c#
classes
methods
objects
0 Votes
2 Answers
25th Jan 2019, 4:56 AM
JPressley
use of static before void main()
c#
methods
0 Votes
1 Answer
4th Jan 2017, 12:08 PM
Himanshu Pandey
#include <stdio.h> int main() { printf("%x",-4>>1); return 0; }
and
e
f
in
is
output
what
2 Votes
4 Answers
17th Mar 2021, 5:58 AM
Ankit Kumar
why we use 'static' keyword with the main()
c#
methods
3 Votes
3 Answers
2nd Jul 2016, 6:30 AM
Nikita Singh
int main() { char str[]="%d %c ",arr[]="sololearn"; Printf (str,0[arr],2[arr+3]); }
c
1 Vote
5 Answers
23rd Jul 2022, 5:00 AM
Always Learn More😎
What's the difference between void main() and int main()?
c
c++
difference
int
main
void
4 Votes
5 Answers
23rd Nov 2016, 4:26 PM
Jaydeep Khatri
#include <stdio.h> int main() { printf("\x61"); return 0; }
c
0 Votes
5 Answers
27th Dec 2018, 2:50 AM
Abdul Rahman Khan
Why we write "int" before writing main()
c++
main
0 Votes
3 Answers
3rd Aug 2017, 4:38 PM
Subhasish Ghosh
what does the circular brackets "()" indicates in main()
c++
main
1 Vote
5 Answers
9th Sep 2018, 12:57 PM
Shreyas Chimote
How do i type another text
int
main()
0 Votes
10 Answers
17th Oct 2020, 12:23 AM
Ultra WALKER
Ask a question
Ask a question
Ask a question
Ask a question
< Previous
1
2
3
...
10
Next >
Hot today
USING HTML ONLY!!!
5 Votes
[SOLVED] What problem in this program..?
2 Votes
Can someone please help me with this python code?
2 Votes
I need help with beginner level of python
0 Votes
Effects on HTML and JavaScript
0 Votes
Programming sickness
3 Votes
Help. Помогите пожалуйста
1 Votes
no se cual es la respuesta de esta
0 Votes
Izzy the iguana
0 Votes
Strange narrowing conversion error from FLTK Color to Color Struct, Stroustrup's header Graph.h
0 Votes