consider the following C code
main()
{
int i=3,x;
while(i>0)
{
x=func(i);
i--;
}
int func(int n)
{
static sum=0;
sum=sum+n;
return(sum);
}
the final value of x is
Answer Posted / vignesh1988i
the final value of x is 6
Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is void pointers in c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is difference between far and near pointers?
What are control structures? What are the different types?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
What are the data types present in c?
When the macros gets expanded?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What are the rules for the identifier?
When we use void main and int main?
What is the difference between formatted&unformatted i/o functions?
Does free set pointer to null?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Multiply an Integer Number by 2 Without Using Multiplication Operator