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


Please Help Members By Posting Answers For Below Questions

An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

708


What is use of bit field?

774


In a switch statement, what will happen if a break statement is omitted?

604


What is the difference between variable declaration and variable definition in c?

565


What are the valid places to have keyword “break”?

651






What is enumerated data type in c?

629


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

666


What is the use of a ‘’ character?

586


Explain what is a const pointer?

642


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

656


What is memcpy() function?

623


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

766


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1634


What is pass by value in c?

597


Write a program to find factorial of a number using recursive function.

647