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

Why pointers are used?

836


What do the functions atoi(), itoa() and gcvt() do?

923


How can I ensure that integer arithmetic doesnt overflow?

837


Write a program to swap two numbers without using a temporary variable?

866


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1728


Is array a primitive data type in c?

799


What is context in c?

742


how we can make 3d venturing graphics on outer interface

4384


Explain what is gets() function?

822


Explain that why C is procedural?

902


Write a program to know whether the input number is an armstrong number.

907


Why is this loop always executing once?

812


Tell me is null always defined as 0(zero)?

847


Write a C program in Fibonacci series.

853


What is the difference between procedural and declarative language?

898