The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
38 views
main()

{

int a=2;

if(a==2)

{

a=~a+2<<1;

printf("%d",a);

}

else

{

break;

}

a)-3

b)-2

c)1

d)compile error
asked in Programming by Boss (12.7k points) | 38 views

1 Answer

0 votes
compiler error : because break should be used with in loops or switch
answered by Active (3.4k points)

Related questions

+2 votes
0 answers
4
asked Jan 6 in Programming by gate_forum Active (1.2k points) | 61 views


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

46,966 questions
51,292 answers
177,260 comments
66,643 users