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
Why isn't it being handled properly?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What is meant by type specifiers?
Explain the difference between getch() and getche() in c?
explain what is a newline escape sequence?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Does free set pointer to null?
What is a global variable in c?
What is a MAC Address?
Write a program which returns the first non repetitive character in the string?
What is a void pointer in c?
What is the heap?
Why do we use return in c?
Can you please explain the difference between syntax vs logical error?
How reliable are floating-point comparisons?