Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Predict the output of the following program:
int main()
{
    int arr[5];
    // Assume base address of arr is 2000 and size of integer is 32 bit
    arr++;
    printf("%u", arr);
    return 0;
}






Solution

Array name arr represents base address.

Size of int = 32 bit = 4 bytes.

Base address = 2000.

After arr++, pointer moves by one integer = 4 bytes.

New address = 2000 + 4 = 2004.



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...