what will be the output of the following program, justify?
#define TEST
int TEST getdata()
{
static i;
i+=10;
return i;
}
main()
{
int k;
k = getdata();
}
Answer Posted / aditya
there is no print statement and hence there is no output.
If at all k is printed it will be 10.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
Explain how many levels deep can include files be nested?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What is page thrashing?
write a program to create a sparse matrix using dynamic memory allocation.
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What is variables in c?
What are different types of operators?
How can I read/write structures from/to data files?
What is #include conio h?
What are header files and explain what are its uses in c programming?
What is preprocessor with example?
Are comments included during the compilation stage and placed in the EXE file as well?
Can you add pointers together? Why would you?
How can you tell whether a program was compiled using c versus c++?