What will be printed as the result of the operation below:

#include<..>

int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
}

Answer Posted / civa


The Output will be:

First output : 12
Second output : 13
Third output : 13

Is This Answer Correct ?    24 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain modulus operator. What are the restrictions of a modulus operator?

818


What are the different file extensions involved when programming in C?

1014


How is a pointer variable declared?

786


What are the 32 keywords in c?

848


What is the correct code to have following output in c using nested for loop?

832


How can I discover how many arguments a function was actually called with?

834


Explain what is a stream?

802


When the macros gets expanded?

1084


What does double pointer mean in c?

780


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

906


Explain 'bus error'?

772


What are the 3 types of structures?

768


What is the purpose of void pointer?

792


What do mean by network ?

889


Explain what are the standard predefined macros?

871