Why can't we initialise member variable of a strucutre
Answer Posted / thunder
Because at the time of creation of structures, memory is not
allocate in the memory block.Memory will be allocated at the
time of creation of structure instance only, that's y we are
not able to initialize the structure members.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
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 are the string functions? List some string functions available in c.
Explain how can I convert a string to a number?
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 are loops c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What does & mean in scanf?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What does void main return?
When should the const modifier be used?
Explain Function Pointer?
What is cohesion and coupling in c?
What is a wrapper function in c?
How is actual parameter different from the formal parameter?
How can you tell whether two strings are the same?