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



Is the below things valid & where it will be stored in memory layout ? static const volatile i..

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

Is the below things valid & where it will be stored in memory layout ? static const volatile i..

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

Post New Answer

More C Interview Questions

Who invented b language?

0 Answers  


What is array in c with example?

0 Answers  


Write a program to check palindrome number in c programming?

0 Answers  


Explain what is the difference between functions getch() and getche()?

0 Answers  


write a recursive program in'c'to find whether a given five digit number is a palindrome or not

2 Answers  


can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?

2 Answers  


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


the format specified for hexa decimal is a.%d b.%o c.%x d.%u

7 Answers   TCS,


What is the role of && operator in a program code?

0 Answers  


SIR PLS TELL ME THE CODE IN C LANGUAGE TO PRINT THE FOLLOWING SERIES 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

4 Answers  


develop algorithms to add polynomials (i) in one variable

0 Answers   Ignou, TCS,


What is the use of the #include directive?

3 Answers  


Categories