Home / MCQ Bank / Computer
Computer Pointer

What will be the output of the following C code? #include <stdio.h> void foo(float *); int main() { int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • 0.000000

Related Computer Questions

Which protocol is used for communication on the internet? What will be the output of the following C code? #include <stdio.h> struct student { char *name; }; void main() { struct student s[2], r[2]; s[1] = s[0] = "alan"; printf("%s%s", s[0].name, s[1].name); } Which symbol is used to declare the preprocessor directives? Transmission of computerised data from one location to another is called What will be the output of the following C# code? static void Main(string[] args) { int i; i = 0; while (i++ < 5) { Console.WriteLine(i); } Console.WriteLine("\n"); i = 0; while ( ++i < 5) { Console.WriteLine(i); } Console.ReadLine(); }