main()
{
struct s1
{
char *str;
struct s1 *ptr;
};
static struct s1 arr[] = { {"Hyderabad",arr+1},
{"Bangalore",arr+2},
{"Delhi",arr}
};
struct s1 *p[3];
int i; < BR> for(i=0;i<=2;i++)
p[i] = arr[i].ptr;
printf("%s
",(*p)->str);
printf("%s
",(++*p)->str);
printf("%s
",((*p)++)->str);
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

0 Answers  


What is an example of structure?

0 Answers  


64/square(4)

1 Answers  


pierrot's divisor program using c or c++ code

0 Answers  


let's take a code struct FAQ { int a; char b; float c; double d; int a[10]; }*temp; now explain me how the memory will be allocated for the structure FAQ and what address will be in the structure pointer (temp)....................

8 Answers  






Magic square

0 Answers  


Which is best linux os?

0 Answers  


What is the difference between null pointer and void pointer

10 Answers   CTS, Manforce, MAQ Software,


what is the different bitween abap and abap-hr?

0 Answers   TCS,


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

0 Answers  


how can use subset in c program and give more example

0 Answers  


What is structure packing ?

2 Answers   HP,


Categories