#define CUBE(x) (x*x*x)
main()
{ int a,b=3;
a=cube(b++);
printf("%d %d",a,b);
}
What should be the value of a and b? My calc a=4 but syst
a=6 how pls tell me if you know it?
Submitted by: Administrator27 4 is the output.
the call to the macro sets a = b*b*b with b = 3, 3 cubed is 27
then b is incremented to 4 after the macro call
Submitted by: Administrator
the call to the macro sets a = b*b*b with b = 3, 3 cubed is 27
then b is incremented to 4 after the macro call
Submitted by: Administrator
Read Online STL Job Interview Questions And Answers
Top STL Questions
☺ | Write a program in C/C++ to implement reader- writer problem? |
☺ | Write a program in C++ returning starting locations of a substring using pointers? |
☺ | Why & sign is used in copy constructor? |
☺ | Write a c++ to define a class box with length, breadth and height as data member and input value(), printvalue() and volume() as member functions? |
☺ | WHAT IS THE DIFFERENCE BETWEEN C++ AND VC++? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |