what will be the output of the following program, justify?
#define TEST

int TEST getdata()
{
static i;
i+=10;
return i;

}

main()
{
int k;
k = getdata();
}


Answer Posted / rama krishna sidhartha

Since there is no output statement in this program there
output will not be displayed.

The output statement must be as follows :

printf("%d",k);

Then the output will be 10.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

1908


What does malloc () calloc () realloc () free () do?

563


How can you convert integers to binary or hexadecimal?

622


What is an arrays?

658


How can you increase the size of a statically allocated array?

622






What is the basic structure of c?

561


What is malloc() function?

640


Explain null pointer.

626


What are the ways to a null pointer can use in c programming language?

592


How can I read a binary data file properly?

637


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

762


Can two or more operators such as and be combined in a single line of program code?

813


Explain the difference between #include "..." And #include <...> In c?

635


Can you subtract pointers from each other? Why would you?

561


Can we increase size of array in c?

545