+ 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; }
7 Answers
+ 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