Why array starts with index 0
Answers were Sorted based on User's Feedback
Answer / saurabh upman
Index is used as an offset value.Giving value 0 to the starting address means that we are 0 element far from the destination in a contigious memory arrangment.It makes the indexing a coherent offset to be assigned.
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program in c to print **** * * * * ****
what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these
How can I make a program in c to print 'Hello' without using semicolon in the code?
9 Answers C DAC, Practical Viva Questions,
which is faster execution: loops or recursion?
How would you obtain the current time and difference between two times?
What is file in c preprocessor?
how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What are the disadvantages of external storage class?
Can you please explain the difference between exit() and _exit() function?
What is the difference between memcpy and memmove?