Telegram Group πŸ”₯πŸ”₯πŸ”₯ Get answers in minutes
Questions answered : 48 /50
Guy
Guy
Guy
Guy
Guy
+ 4981 more
Verified Answer verified

What will be the output of the program
#include<stdio.h>

int main()
{
void fun(int, int[]);
int arr[] = {1, 2, 3, 4};
int i;
fun(4, arr);
for(i=0; i<4; i++)
printf("%d,", arr[i]);
return 0;
}
void fun(int n, int arr[])
{
int *p=0;
int i=0;
while(i++ < n)
p = &arr[i];
*p=0;
}

πŸ—“ Mar 22, 2025

Answer is "1, 2, 3, 4"

Comments and Discussions

You don't need to login to post your comment

Comments:
30
Views:
60k
Likes:
120k
304 votes
Samantha 🌐 India
Please please explain this answer to me
Was this answer helpful?
314 votes
Hailey 🌐 India
I'm in exam, can any one give the solution for this question
Was this answer helpful?

Was your question answered?

Want to get famous? πŸ“Έ

Answer question and get 🀩 high-lighted on our homepage.

Just Automated Logo

Β© 2017-2022 Foxoyoβ„’
All rights reserved.

Facebook Connect with us