Courses
Courses
Code Compiler
Code Compiler
Discuss
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
void main() { int j[10]={9,7,5,3,1,2,4,6,9}; int i=1; clrscr(); for(;i<9;i++) printf("%d ",--j[i++]); getch(); }
c++
0 Votes
6 Answers
7th Jul 2017, 7:29 PM
Munmun Bhandari
Can we declare a variable out of the main() and out of any function?
declaration
variables
7 Votes
4 Answers
20th Oct 2016, 5:22 AM
Rebeka Asryan
Why do we include arguments in the main() method inside a class?
java
1 Vote
4 Answers
1st Jul 2017, 7:11 PM
Divya Vishwakarma
#include <stdio.h> int main() { int i=0; for(i=1;i<=5;i++); printf("%d",i); return 0; }
answer
any
can
code
give
of
this
1 Vote
1 Answer
30th Dec 2020, 3:59 AM
Ankit Kumar
int main() { int x=3; cout<<(x<5) +1; return 0; }
cpp
0 Votes
2 Answers
1st Jul 2017, 2:53 AM
Kushagra Agarwal
#include<iostream> using namespace std; int main() { int a=10,b=20,sum=a+b; a=5; cout<<"The sum is\n"<< sum << endl;
c++
variables
9 Votes
8 Answers
1st May 2017, 12:59 AM
MUʜAMMED ɪʟʟYAS
#include <stdio.h> int main() { int c=50; for(;c;) c--; printf ("c=%d",c); return 0; }
=0
c
why
0 Votes
4 Answers
27th Dec 2020, 9:43 AM
Ankit Kumar
#include <stdio.h> int main() { float a=0.7; if(a>0.7) printf("condition true"); else printf ("condition false");}
c
4 Votes
2 Answers
5th Nov 2019, 5:13 PM
Amar kumar
Simply if i say... Then int main() Works but intmain() does not... Why??
c++
0 Votes
6 Answers
5th Aug 2016, 3:00 AM
Prabhat Chandra Dwivedi
can we use public int main() instead of void main()?
java
0 Votes
2 Answers
26th Dec 2017, 5:27 PM
venkatasubramani
How does a main() function in c++differ from main()in c?
c++
0 Votes
2 Answers
9th Nov 2017, 8:29 AM
Durgvijay Prasad
#include <stdio.h> int main() { int j=0; for(int i=0; i<100; i++) { j=j++; } printf("%d", j); } Output = 0
c
5 Votes
9 Answers
7th Dec 2018, 4:37 PM
👑 Ak-king 👑
Why a function main() has to return value!!!!!! Don't understand about return 0
c++
return
1 Vote
5 Answers
28th Jul 2017, 3:22 PM
Serious Sam
#include<stdio.h> #include<string.h> void main() { char *str="His"; int i=0; for(i=0;i<=strlen(str);i++) printf("%s",str++); }
c
c++
challenge
codding
code
html
jquery
require
sololearn
subqueries
1 Vote
3 Answers
29th Apr 2020, 3:59 AM
Rihaj Mujawar
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 0; }
java
-3 Votes
5 Answers
25th Nov 2016, 3:54 AM
Ahmet Bozkurt
What array of strings actually gets passed to the main() method?
java
main
methods
1 Vote
2 Answers
13th Jan 2018, 7:54 PM
Erik Johanson
Why do we always write String args[] as a parameter in the main() function in Java ?
java
7 Votes
4 Answers
12th Dec 2019, 10:19 AM
Smriti Kaur
Predict the output of following program? #include "stdio.h" int main() { char arr[100]; printf("%d", scanf("%s", arr));
c
7 Votes
4 Answers
28th Mar 2020, 3:49 AM
Raj Kalash Tiwari
int main() { printf("int: %d \n", sizeof(int)); printf("float: %d \n", sizeof(float)); printf("double: %d \n", sizeof(d
?
1 Vote
6 Answers
21st May 2019, 12:57 PM
Artificial Intelligence
#include <stdio.h> int main() { printf("%d",printf ("HelloWorld")); return 0; }
print
question
-3 Votes
2 Answers
23rd Feb 2018, 4:30 AM
Mahendra Lalani
a. The main() method holds two integer variables. (User Inputted)
java
-1 Vote
1 Answer
29th Sep 2022, 10:42 AM
Dumpxz
#include <iostream> using namespace >std; int main() { cout << "C/n+/n+">>endl; return 0; }
code
problem
0 Votes
4 Answers
2nd Feb 2022, 7:49 AM
ᴮᴰ⁷¹〆ᴀʟᴀмιɴ﷼ツ࿐
Hello, could you tell me the difference between the function declared outside main() and inside main()? Thanks in advance! 🙌🏻✨
c
c++
declaration
difference
function
main
main()
scope
6 Votes
9 Answers
22nd Jan 2021, 2:06 PM
Mahima Rajvir Singh
#include <iostream> using namespace std; int main() { for (int x=1; x<10; x++) { if (x==2){ continue; } if (x==5){ break; } cou
c++
programming
1 Vote
12 Answers
30th Dec 2022, 3:45 PM
Alex Boso Nzaphila
#include <iostream> #include<string> using namespace std; int main() { string a; cin>>a; cout<<a; return 0; }
c++
strings
4 Votes
8 Answers
9th Mar 2017, 4:09 PM
SIGMA
Can we execute a Java Program without having main() method in our program???
execute
java
main()
0 Votes
5 Answers
30th Aug 2017, 6:24 PM
Syed Tabarak
Void main() { int a[]={1,2,9,8,6,3,5,7,8,9}; int *p = a+1; int *q = a+6; printf("\n%d",q-p); }
answer
1 Vote
2 Answers
30th Jun 2018, 8:47 PM
Manzuma Memunat
#include <stdio.h> main() { int i; for(i=0;i<5;i+=4) { i=i*i; } printf("ans %d",i); return 0; }
include<stdio.h>
main(
0 Votes
5 Answers
11th Sep 2020, 9:44 AM
Chauhan Ashutoshkumar Harishankar
#include<stdio.h> int main() { int x,y,z; x=8++; y=++(x)++; z=(x+y)--; printf("x=%d y=%d z=%d\n",x,y); }
a.
1 Vote
1 Answer
4th Jun 2019, 3:59 AM
Ajay Mishra
Why is there a main() function in Python? How do i use it?
function
java
main
method
python
1 Vote
1 Answer
4th Jan 2020, 1:18 AM
Pame
Why should we start code with int main() ? What it does ?
c++
1 Vote
4 Answers
25th Apr 2017, 2:51 PM
Akash Khamkar
#include<iostream> #include<conio.h> #include<stdio.h> void main() { int i; char str[80]; cout<<"enter any name"; gets(str); for(i=0;str[i]!='\0';i++) {cout<<str[i]<<"\n"; } getch(); }
c++
error
0 Votes
21 Answers
21st Jun 2016, 12:07 PM
Kshitij
#include<stdio.h> main() { short a,b; a=2; b=5; b=a++ +b+a; printf("Output %d\n",b);//9 printf("Output %d\n",a);//3 }
c
clanguage
0 Votes
3 Answers
15th Oct 2020, 9:30 AM
[YUTIK...
#include <iostream> using namespace std; int main() { int a[]={3,5,2,1}; for(int i=1;i<5;i++) { a[0]=a[i]+1; } cout<<a[0];
c++
0 Votes
10 Answers
23rd Dec 2016, 1:46 PM
Sumit Lokhande
In my school I was taught that C++ program starts with void main() and not int main().
auxiliumconvent
dum
in
my
school
1 Vote
6 Answers
5th Nov 2021, 8:27 AM
Anisha Chakraborty
#include <stdio.h> #define MAX 50 int main() { int a[MAX][MAX], b[MAX][MAX], product[MAX][MAX]; int arows, acolumn
q
0 Votes
6 Answers
7th May 2021, 2:11 PM
Radha Shinde
Why some of the compiler showing error when we write void main() in c++?
c++
1 Vote
5 Answers
8th Sep 2017, 4:34 AM
jemee
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b; c=a+b; c=a-b; cout<<c; return 0; }
c++
1 Vote
7 Answers
30th May 2018, 8:21 AM
Bunny
can you write more than one main() class in a single source file
java
programs
1 Vote
2 Answers
27th Sep 2019, 1:23 PM
Ganesan C
#include <iostream> using namespace std; int main() { int x = 15/(3*(5/3)); cout << x; return 0;} D output wz 5 hw
operators
3 Votes
9 Answers
29th Mar 2018, 6:32 AM
JeClives
how to print a message to console without using main() function?
c++
0 Votes
2 Answers
16th Aug 2016, 5:11 PM
janani sundar
how many main() function in program can be written in program?
c++
main
0 Votes
2 Answers
18th Aug 2016, 1:27 PM
loke wei lun
Why should we mention 'int' before main() function ? What is the use of it?
c
1 Vote
4 Answers
22nd Jul 2020, 4:55 AM
Jarpula Aravind
#include<iostream> #include<math.h> using namespace std; int main() { double x=0.5,result; result =cos(x); cout<<"cos("<<x<<")="
123
0 Votes
2 Answers
8th Jan 2020, 2:29 PM
Ķaņï Ķańï
#include<stdio.h> int main() { char *ptr = "Hello"; printf("%c\n", *&*ptr); return 0; }
c
pointers
0 Votes
1 Answer
18th Jan 2021, 6:27 PM
yogesh
Can we write a java program without main() and by writing static block
for
java
1 Vote
3 Answers
31st Mar 2017, 6:40 PM
Deepak Ghodase
#include <stdio.h> int main() { printf("Color: %s, Number: %d, float: %5.2f \n", "red", 42, 3.14159);
input
output
0 Votes
4 Answers
10th Mar 2020, 8:36 PM
sagor zia
#include<stdio.h> #include<string.h> int main() { char str[20] = "Hello World!"; printf("String before strrev(): %s\n",str)
c
1 Vote
1 Answer
1st Jul 2022, 2:16 AM
Rona Vicente
Why do we preffer writing int main() instead of void main()...?
c
cpp
function
main
return_type
1 Vote
1 Answer
25th Sep 2017, 5:44 PM
Ankur Pashine
#include <iostream> using namespace >std; int main() { cout << "C/n+/n+">>endl; return 0; }
problem
-1 Vote
3 Answers
2nd Feb 2022, 7:04 AM
ᴮᴰ⁷¹〆ᴀʟᴀмιɴ﷼ツ࿐
Ask a question
Ask a question
Ask a question
Ask a question
< Previous
1
...
4
5
6
...
10
Next >
Hot today
How to use the get() method
3 Votes
How to get account back?
1 Votes
Game Dev Path
3 Votes
why is this platform infested with web devs
3 Votes
So this what I'm trying to solve
2 Votes
PHP Tutorial Idea
1 Votes
Problem whit Javascript
1 Votes
Use Python for string manipulation and sorting.
1 Votes
So how do I create python file and be able to code in it?
0 Votes
How to open the test cases on sololearn I tried so many times with the correct code
0 Votes