Answer Posted / bijayalaxmi behera.
The index of an array is an OFFSET from the beginning of the
array, multiplied by the width of the array items:
Say an array of integers, 4 bytes long.
Say beginning of array at address 0x1000
First integer address: BaseAddress + (index * len) = 0x1000
+ ( 0 * 4) = 0x1000
Second integer will be at : 0x1000 + ( 1 * 4 ) = 0x1004.
Is This Answer Correct ? | 4 Yes | 6 No |
Post New Answer View All Answers
What type of function is main ()?
Difference between goto, long jmp() and setjmp()?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What are reserved words?
given post order,in order construct the corresponding binary tree
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What is the difference between array_name and &array_name?
Give the rules for variable declaration?
Which is better oop or procedural?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
What is preprocessor with example?
What is variable in c example?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
What is the use of bit field?