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

What is array of pointers to string?

0 Answers  


Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.

6 Answers   Wipro,


Write a program that receives as input a number omaadel-n-print, four digits.

0 Answers  


What is wrong in this statement?

0 Answers  


Compare interpreters and compilers.

0 Answers  






Why is c fast?

0 Answers  


What are the salient features of c languages?

0 Answers  


what is bit rate & baud rate? plz give wave forms

0 Answers  


What is an operator?

0 Answers  


4.weight conversion: Write a program that will read weight in pounds and convert it into grams.print both the original weight and the converted value.There are 454 grams in a pound.design and carry out a test plan for this program.

1 Answers   Wipro,


can u give me the good and very optimised code for a car racing game?

0 Answers  


Write a program to add a given duration with time(24hrs format)

1 Answers   Protech,


Categories