what will be the output off the following program?
#include<stdio.h>
int main()
{
int a;
a=015+0*71+5;
printf("%d,a");
return0;
}
Answer Posted / shiv
015 is octal number its decimal equivalent is = 5 * 8 ^ 0 +
1 * 8 ^ 1 = 5 + 8 = 13
0*71 is 0
then finally , a = 13 + 0 + 5 = 18
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What does sizeof function do?
What is pre-emptive data structure and explain it with example?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Why is sprintf unsafe?
What is the benefit of using an enum rather than a #define constant?
What is the purpose of the preprocessor directive error?
In c language can we compile a program without main() function?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
What is the best way of making my program efficient?
Compare array data type to pointer data type
What are high level languages like C and FORTRAN also known as?
Can we use any name in place of argv and argc as command line arguments?
What is meant by keywords in c?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What should malloc() do? Return a null pointer or a pointer to 0 bytes?