Курсы
Курсы
Компилятор кода
Компилятор кода
Обсуждения
Teams
Войти
Регистрация
Menu
Обсуждения
Поиск
Поиск
Задать вопрос
Задать вопрос
In data types example why void main() is not there? Why int main()?
data-types
0 голосов
2 ответов
26th Jan 2019, 7:40 AM
hetvi Ashokbhai parikh
#include <stdio.h> #define square(x) x*x int main() { int i=(28/square(4)); printf("%d",i); return 0; }
define
0 голосов
2 ответов
1st Sep 2020, 10:42 AM
Rohit Ahuja
#include <stdio.h> int main() { int a[5]={1,2,3,5,8}; int first,second =0; for(int i=0;i<=4;i++) { if (a[i]>first ) {
array
3 голосов
5 ответов
14th Jul 2018, 5:07 AM
IShiva SHreya
#include <stdio.h> int main() { int x = 5; if (x<1); {printf("Hello");} }
help
0 голосов
2 ответов
15th Dec 2019, 2:33 PM
Avantika Nagrale
Why there is no semicolon at the end of the line static void main()
c#
output
2 голосов
3 ответов
1st Apr 2017, 5:47 AM
Rakesh Chandra Dash
What is the output of this program? #include<iostream> int main() { int k=6,m=1; k-=k; m=m+k; cout<<k<<" "<<m; return 0; }
c++
3 голосов
17 ответов
20th Aug 2016, 10:07 AM
Muhammed cp
int main() { int n=100; cin >> n; int sum=0; for (int n=1; n<=100; n++){ sum+=n; } cout<<sum; }
c++
programming
0 голосов
8 ответов
31st Dec 2022, 1:30 PM
Alex Boso Nzaphila
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 11; } is something wrong
program
0 голосов
8 ответов
18th May 2018, 3:08 PM
Shivam Kumar
Why int is used before main() in hello world. It's not an integer though. ?
c++
1 голос
4 ответов
18th Dec 2018, 12:16 PM
Aditya Rathore
Pleade Explain output of this code int main() { cout <<1+"hello"; return 0; }
c++
0 голосов
2 ответов
1st Nov 2019, 10:23 AM
Somvir Dhaka
#include<stdio.h> #include<math.h> int main() { float a,b,c,s,area; printf("ENTER THE THREE SIDES OF A TRIANGLE REPECTIVELY");
pls
-2 голосов
4 ответов
17th Sep 2020, 5:37 AM
MSD
#include <iostream> using namespace std; int main() { //print "C++ is cool" return 0; }
answer
it
please
1 голос
2 ответов
7th Oct 2021, 7:05 AM
Trupti Giri
In C++ do you prefer main() to return a void or an int?
c++
error
functions
programmingpractices
return
value-types
0 голосов
3 ответов
30th Sep 2017, 3:52 AM
GW III
#include <iostream.h> #includd<ctype.h> void Secret(char Msg[],int N); void main() {char SMS[]="rEPorTmE"; Secret (SMS,2); cout<
c++
0 голосов
4 ответов
1st Aug 2017, 5:11 PM
vishal kalbande
why there is an blank/next line between header file and main() function of c program?
c
2 голосов
4 ответов
25th Jan 2018, 6:51 AM
ShriekDj
#include <iostream> using namespace std; void printSomething(int x) { cout << x; } int main() { printSomething(42); }
<b>
1 голос
4 ответов
14th Apr 2018, 12:20 PM
TOKOLLO COLLEN
Write a method class showData() that will display the data of both the objects from the main() method.
java
0 голосов
11 ответов
4th Apr 2017, 6:15 AM
amit
C++
{
*p
int
main()
0 голосов
7 ответов
1st Mar 2021, 4:09 AM
Aminu Abdulkadir
#include <iostream> using namespace std; int main() { int a[]={1,2,3,4}; for(int x=0;x<4;x++) { a[0]+=a[x]; }
c++
1 голос
2 ответов
3rd May 2019, 3:06 AM
Husaain Naqvi
#include <iostream> using namespace std; int main() { cout<<12+"good morning\n"-24; return 0; }
c++
1 голос
1 ответ
4th May 2017, 6:20 PM
siddiqui junaid
#include <iostream> int main() { int i=8,j=3,x; x=i++; j=++i; cout<<x; cout<<--j<<j--<<++j; return 0;}
c++
output
1 голос
2 ответов
7th Feb 2017, 1:02 PM
Vaaru
#include<stdio.h> union terca{ int a; int b; }; int main() { union terca v; v.a=10; v.a=20; printf ("%d",v.a);
c
programming
union
1 голос
6 ответов
24th May 2021, 3:16 AM
Maniprakash V
#include <iostream> using namespace std; int main() { int a=1 ,b; a=b; cout << b+a; return 0; }
variables
1 голос
8 ответов
25th Jan 2019, 6:42 AM
Akash Kumar
What type of function is main() function? Whether is it built-in or user defined?
functions
0 голосов
2 ответов
4th Jan 2021, 1:24 PM
Imran Azad
#include <stdio.h> int main() { int i,n; char a[100]; gets(a); n=strlen(a); for(i=0;i<=n;i++) { printf("%s",a[n-i]); }
c
0 голосов
2 ответов
2nd Dec 2021, 2:10 PM
Karthik C
#include <iostream> using namespace std; //Compiler version g++ 6.3.0 int main() { int myVariable = 10; "Cout" << "myvari
print
0 голосов
7 ответов
26th Aug 2020, 11:11 AM
JASHANPREET SINGH
#include <iostream> using namespace std; int main() { int x=2; cout <<(x-++--x); return 1; }
c++
data-types
0 голосов
4 ответов
25th Sep 2016, 12:40 PM
Sourabh Goyal
#include <stdio.h> int main() { int var1,var2; var1=10; var2=10; var2=2*(++var1+2) - 2*(--var1-2); printf("Var1=%d \n Var2=%
c
1 голос
1 ответ
25th Mar 2019, 10:17 PM
Gab
is this code wrong # include <iostream> using namespace std; int main() { int age; cin>> age; switch(
c++
0 голосов
6 ответов
17th Feb 2020, 9:52 PM
MÆŘEÁLT
Is writing int before cout necessary i.e int main() { cout<<"hello world";
c++
-1 голос
1 ответ
7th Oct 2016, 7:59 AM
ashish mehta
When we should use void main() and when to use int main()..!
1 голос
1 ответ
24th Nov 2016, 2:35 PM
Tanu Purohit
How to passing string array from function to main() by references [c++]
array
c++
reference
1 голос
1 ответ
2nd Dec 2017, 9:42 AM
Asyraf Ilias
Do I need to write the methods declared before main() in algorithm?
c++
0 голосов
1 ответ
6th Aug 2016, 5:28 PM
Learner
# include <iostream.h> # include <std.h> int main() { cout<<"hello world"; return 0; }
c++
2 голосов
2 ответов
30th Jan 2018, 3:26 PM
Sakshi
Why main method can't be final in java?
final
java
main()
override
2 голосов
6 ответов
2nd Jul 2018, 4:05 AM
Jain Rishav Amit
#include <stdio.h> struct student{ char *c; }; int main() { struct student s[2]; printf("%ld",sizeof(s)); return 0; }
struct
0 голосов
5 ответов
11th Sep 2020, 8:20 AM
Rohit Ahuja
can u write a c++ program in all caps? like :#INCLUDE<IOSTREAM. H> VOID MAIN() { COUT<<"CHALLENGE";}
c++
1 голос
5 ответов
24th Mar 2017, 6:08 AM
Vishvambar Panth
I'm stuck on def main() function in importing modules, can someone give an example?
import
into
temp
temperature
1 голос
1 ответ
4th Apr 2018, 12:17 AM
Aaron
#include <iostream> using namespace std; int main() { //modify the given statement cout << "C++"; return 0; }
solo
0 голосов
6 ответов
5th Nov 2021, 8:44 AM
Eman Mohamed Salem Mohamed
class person{ private : int age=8; public : person(int age){ cout<<this->age; } }; int main() {person p(2);}
c++
output
0 голосов
6 ответов
5th Jul 2017, 2:17 PM
Kushagra Agarwal
Can we overload the main() method in java? If yes then which will be executed first?
java
0 голосов
3 ответов
9th Apr 2019, 3:01 AM
Avinash Maurya
#include<stdio.h> int main() { int i,j,k; for(i=1;i<=3;i++) { k = i; for(j=1;j<=i;j++) { printf("%d ", k
c
0 голосов
3 ответов
2nd Aug 2021, 8:38 AM
Husnain Ansari
#include <iostream> using namespace std; int main() { string s = "SoloLearn"; cout << (s[1]==s[3]); }
c++
1 голос
2 ответов
28th Mar 2023, 11:44 AM
Muhammad Bilal
#include <stdio.h> int main() { int i=3; if(!i) i++; i++; if(i==3) i+=2; i+=2; printf("%d",i); return 0; }
if
0 голосов
4 ответов
21st Aug 2020, 9:15 AM
Rohit Ahuja
What are header files and can we add more than one main() functions?
c
0 голосов
1 ответ
9th Mar 2021, 8:29 PM
Hateem Arshad
What is the effect on my code if I declare the header files after main() in C or C++?
c
c++
1 голос
9 ответов
6th Mar 2018, 6:16 PM
Arihant Jain
Why is the output '0'. But declaring array in main() gives a garbage value(as it should)...??
c++
2 голосов
3 ответов
11th Nov 2017, 5:04 PM
Saransh Bhatia
does all the code in C++ should be written inside main() function only....????except the class, function.....
answer
please
question
the
1 голос
4 ответов
27th Apr 2017, 8:11 AM
Paavan Gupta
Can we reassign the variable values in main() function by using the user defined function (return type || void )? In C
c
doubt
in
2 голосов
9 ответов
17th Oct 2020, 6:47 AM
Yogeshwaran P
#include <stdio.h> void main() { float x = 0.1; if (x == 0.1) printf("Sanfoundry"); else printf("Advanced C Classes"); }
c
c++
2 голосов
3 ответов
16th May 2020, 12:56 AM
𝒱𝑒𝓃𝑜𝓂𝑜𝓊𝓈
Задать вопрос
Задать вопрос
Задать вопрос
Задать вопрос
< Предыдущий
1
...
5
6
7
...
10
Следующий >
Актуальное сегодня
Ejercicio Pytho
0 Votes
What's wrong with this code ? ( Beginner)
2 Votes
What is that z for
0 Votes
Bug on "Java for Beginners Module 3 Quiz"
1 Votes
Suggestions needed
4 Votes
Please rate my code from 1 to 10
2 Votes
Write a program to find the strings are in isogram or not
0 Votes
Square Roots
0 Votes
How to start
0 Votes
Is there any new bug in the projects reply sections?
0 Votes