. Consider the following program
main()
{
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(A) 1 (B) 3 (C) -6 (D) none
Answer Posted / sandip talukder
answer is(B). coz b holds d adrs ofa[2].so b[0]is 6. thats
why b[-1] is 3.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Can you subtract pointers from each other? Why would you?
How do you list files in a directory?
Differentiate between #include<...> and #include '...'
find the sum of two matrices and WAP for it.
Which is an example of a structural homology?
Write a code of a general series where the next element is the sum of last k terms.
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
Why is c called c?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Multiply an Integer Number by 2 Without Using Multiplication Operator
Difference between pass by reference and pass by value?
Explain output of printf("Hello World"-'A'+'B'); ?
Does c have function or method?
What is an example of structure?
What is the difference between near, far and huge pointers?