what is the value of b
if a=5;
b=++a + ++a

Answer Posted / sandeep

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int a=5,b;
if(a==5)
{
b=++a + ++a;
Console.WriteLine(b);
Console.ReadLine();
}
}
}
}

answer is 13

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who developed c language?

642


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2725


When a c file is executed there are many files that are automatically opened what are they files?

594


Which is better oop or procedural?

634


What is the size of enum in bytes?

588






write a proram to reverse the string using switch case?

2469


What is #line used for?

580


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

613


What is the difference between array and linked list in c?

600


Explain how can you restore a redirected standard stream?

592


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

713


What is pointers in c?

658


What are the different types of control structures in programming?

660


How do I convert a string to all upper or lower case?

629


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

610