Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
275 views
in Information Technology by (88.5k points)
closed by

Consider the following C program:

#include <stdio.h>

int main ( )

{

int arr [ ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;

printf (“ % d \n”, ip[1]);

return 0;

}

The number that will be displayed on execution of the program is _________.

1 Answer

0 votes
by (85.4k points)
selected by
 
Best answer

int  *ip = arr + 4 //ip is a integer pointer pointing to 5 element of the array

ip[1] = *(ip + 1xsizeofint) = *(address of 6th element) = 6

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...