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 |
Is c procedural or object oriented?
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.
3 Answers Google, Infosys, JTL, OpenFeel,
Explain high-order bytes.
what is the difference between call by value and call by reference?
5 Answers Genpact, Global Logic, Infosys,
could u able to tell about suresoft technical session
i want to job in your company, so how it will be possible.
can we print any string without using terminator?
How to avoid structure padding in C?
Find the highest of three numbers and print them using ascending orders?
Is using exit() the same as using return?
How do you generate random numbers in C?
Are pointers integer?