Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

0 Answers   Ignou,


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

0 Answers  


what is meant by the "equivalence of pointers and arrays" in C?

3 Answers   Satyam,


7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above

10 Answers   Accenture,


Write a program to know whether the input number is an armstrong number.

0 Answers   Wipro,


which type of question asked from c / c++ in interview.

2 Answers  


Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : printf("A"); break; case 0 : printf("B"); break; default : printf("C"); break; }} while(i<3); }

4 Answers   Vector, Vector India,


Binary tree traversing

1 Answers   Qualcomm,


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

0 Answers  


Is it acceptable to declare/define a variable in a c header?

0 Answers  


What is declaration and definition in c?

0 Answers  


Categories