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
What is a macro?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
Why do we write return 0 in c?
What is omp_num_threads?
How many types of functions are there in c?
What is a char c?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is difference between structure and union with example?
Can an array be an Ivalue?
Explain how do you print only part of a string?
What is scope rule in c?
What is the difference between struct and typedef struct in c?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is the value of uninitialized variable in c?
What does main () mean in c?