Answer Posted / sandeep
We Can't define function inside the structure
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
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); }
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
What is the purpose of scanf() and printf() functions?
What is the purpose of void pointer?
What is the significance of scope resolution operator?
Why can't I perform arithmetic on a void* pointer?
What are pointers?
What is the difference between exit() and _exit() function?
How can you tell whether two strings are the same?
How can I copy just a portion of a string?
Write a program to reverse a linked list in c.
What is the concatenation operator?
What is the scope of static variable in c?
What are multibyte characters?