No Arguments!!

What will be the output to the following c code?

include<stdio.h>

int main() { int a=10,b=20,c=30; printf("%d %d %d"); return 0; }

  1. 10 20 30
  1. Compile Error
  1. Garbage Value's
  1. 30 20 10

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Test User
Apr 12, 2014

A simple trip to an online C compiler will answer this question, delivering values which fall far outside of {10, 20, 30}. Further searching Stack Overflow, this link can be found which says that whatever value resides in the esi register when the function is called will be pulled and printed.

Its compilation error.

Vighnesh Raut - 7 years, 1 month ago

can we do dynamic allocation in c/c++ ??? if not.. there will be compilation error ! int a=10,b=20 etc..

निनाद पेठकर - 7 years, 1 month ago

Its compile error,

Smit Kiri - 7 years, 1 month ago

It's giving 30 20 10 in turbo c++......

Debajyoti Ghosh - 7 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...