ExamVeda
Login
Home
This question belongs to C Program Arrays And Strings
Arrays and Strings
?

What will be the output of the program if the array begins at address 65486?
#include<stdio.h>
void main()
{
    int arr[] = {12, 14, 15, 23, 45};
    printf("%u, %u", arr, &arr);
}

Answer & Solution
Correct Answer: Option D

>> int arr[] = {12, 14, 15, 23, 45}; The variable arr is declared as an integer array and initialized.

>> printf("%u, %u", arr, &arr); Here,
The base address of the array is 65486.

=> arr, &arr is pointing to the base address of the array arr.
Hence the output of the program is 65486, 65486.

Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Hareesh K.m
Hareesh K.m 8 years ago
what is &arr means??