263 views

1 Answer

Best answer
3 votes
3 votes

only first return will get executed .After which the control will be transferd back

#include<stdio.h>

int fun()
{
return 5+2;
return 5-1;
}

int main() {

    printf("%d ", fun());
	return 0;
}

Here output will be 7 . The will execute successfully witout any error

selected by

Related questions

2 votes
2 votes
1 answer
1
Ankita87077 asked Dec 2, 2021
584 views
int a = 50, b = 50;a = a+++++b;b = b+++++a; Value of b after executing these .I think it should be undefined behaviour. But in answer it is given 155. Can anybody verify ...
1 votes
1 votes
0 answers
2
Deepalitrapti asked Jun 5, 2019
874 views
How comes 3 states i got 4 states
0 votes
0 votes
0 answers
3
Devwritt asked Mar 21, 2017
502 views
Please explain in simple words as i always face problem in such type of questions-
0 votes
0 votes
1 answer
4
Rahul Jain25 asked Dec 28, 2016
565 views
What will be subnet for all and also their DBA's???