जॉइन Examsbook
1360 0

प्र: Point out the error, if any, in the following program. main() {     int a = 10;     void f();     a = f();     printf ( "\n %d", a ); } void f() {     printf ( "\n Hi "); }

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

In spite of defining the function f() as returning void, the program is trying to collect the value returned by f() in the variable a.

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई