Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 3
In c language if function data type is void and it returns 1, then it will give error or compile successfully
Void fun(){ int test=1; Return 1; }
6 Respostas
+ 5
Error : no ā
Warning : Yes ā
Here's proofš
https://code.sololearn.com/cjDrpx8UcQl1/?ref=app
+ 4
šJasprit š”ļø no bro it will not produce error, but it will give warning see arsenic's code
+ 2
Try this
#include <stdio.h>
void func()
{
printf("executed without error");
// return 2;
}
int main()
{
func();
return 0;
}
+ 1
Arsenic thank you bro
+ 1
Martin Taylor
Thank you bro
0
šJasprit š”ļø thank you bro