Is the below things valid & where it will be stored in
memory layout ?
static const volatile int i;
register struct { } ;
static register;

Answer Posted / banavathvishnu

register struct test
{
int i;
char c;
float f;
};

int main()
{
struct test t;
t.c = 'v';
printf("%c",t.c);


getch();
}
The above code is valid
The below code is invalid

register struct test
{
};

int main()
{
struct test t;
t.c = 'v';
printf("%c",t.c);


getch();
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1369


any "C" function by default returns an a) int value b) float value c) char value d) a & b

656


Why do we need a structure?

578


What is the purpose of void in c?

609


Is register a keyword in c?

623






Can true be a variable name in c?

553


What is a MAC Address?

621


What are the __date__ and __time__ preprocessor commands?

561


What are the difference between a free-standing and a hosted environment?

732


What is a volatile keyword in c?

629


Write a program to use switch statement.

650


What is property type c?

596


What is define c?

564


Explain output of printf("Hello World"-'A'+'B'); ?

967


Is the exit() function same as the return statement? Explain.

652