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

What is structure in c explain with example?

739


What is meant by keywords in c?

729


What is difference between class and structure?

680


What are dangling pointers? How are dangling pointers different from memory leaks?

759


what is stack , heap ,code segment,and data segment

2322






what is the significance of static storage class specifier?

1774


Write a code to remove duplicates in a string.

728


Explain what does the function toupper() do?

735


Do array subscripts always start with zero?

880


How can you tell whether two strings are the same?

920


What is static and auto variables in c?

659


Explain what are the different data types in c?

851


How can I automatically locate a programs configuration files in the same directory as the executable?

722


Explain the difference between exit() and _exit() function?

754


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1687