What is the output of this C code? - ProProfs Discuss
Advertisement

What is the output of this C code?

What is the output of this C code?

Change Image    Delete

#include <stdio.h> int main(){ int var = 010; printf("%d", var); }

Asked by Prabhaforritari, Last updated: Dec 22, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

John Smith

John Smith

John Smith
John Smith

Answered Jul 04, 2017

8

010 is octal representation of 8.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.