Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?



If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?..

Answer / padmas

The above line of the code gets executed using the C++ program, the output will give 10 as value of b at the prompt. It will process the b+=(5%7*2), as b values is already given as 6 then it will add, to the assigned value to the result got from the expression. if properly syntaxes and executed the program.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is abstraction in oops?

0 Answers  


143.what is oops principles?

10 Answers  


what i oops concept, how many languages supports oops concept?

3 Answers   Value Labs,


what is virtual destructor

7 Answers   L&T, TCS,


Write A Program using Single and Multiple Inheritance.

1 Answers  


#include <iostream> using namespace std; int main() { int a = 2; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][c[1][4]]; }

2 Answers   TCS, Wipro,


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

0 Answers   HCL,


Describe these concepts: Polymorphism, Inheritance and Abstraction.

0 Answers   TCS,


can we make game by using c

1 Answers   SmartData,


Can you name some types of inheritance?

1 Answers   Motorola,


create a class complex having real and imaginary part of a complex no. as a data member. overload the binary operators(+,- and *) to perform the operations on complex no. objects. overload binary operator using friend function.

2 Answers   CTS, Delhi University,


What are virtual classes?

0 Answers  


Categories