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 what header files do I need in order to define the standard library functions I use?

897


What is the use of #define preprocessor in c?

848


Explain how can I write functions that take a variable number of arguments?

822


I need previous papers of CSC.......plz help out by posting them.......

2098


Why isnt any of this standardized in c?

859


What is scanf_s in c?

860


What are reserved words with a programming language?

855


Which is better oop or procedural?

831


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2661


write a c program to find the sum of five entered numbers using an array named number

1892


Mention four important string handling functions in c languages .

863


Can you define which header file to include at compile time?

816


What are the advantages of using Unions?

867


What is the use of structure padding in c?

818


What does the c in ctime mean?

815