Is the below things valid & where it will be stored in
memory layout ?
static const volatile int i;
register struct { } ;
static register;
Answers were Sorted based on User's Feedback
Answer / guest
1.static const volatile int i;
is valid cos it is possible to declare a variable with
multiple qualifiers.
2.register struct a{ } ; is invalid but it will be valid
when u doesnt have body of the structure.
ie., struct a;
3.static register int i; is also invalid cos, here
different storage classes are assigned to a single
variable.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / 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 |
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
Who developed c language?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
what is the return type of printf
If you know then define #pragma?
Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ 3) char x=12;
write a c program to add two integer numbers without using arithmetic operator +
what is function pointer?
What is the difference between #include and #include 'file' ?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?