hi cld anybody explain me the concepts of continue,break,return statement with an example using c program

hi cld anybody explain me the concepts of continue,break,return statement with an example using c program

Sure. Then we could write your text book, your website tutorial, take your tests, etc.

I don't mean to be harsh, but we're not Google, we're not auditioning to be your tutor, and we're not a replacement for your text books.

Life is way too short for that. We did our homework or individual studying, and you should do yours. Don't take us for granted, please.

The way it works is YOU post your code or pseudo code that you're working on/having trouble with or don't understand, and we'll try to help you solve THAT problem, on your posted code.

commented: everyone makes mistakes no need to get personal. -1

ADAK is right, and i agree. But I also don't see a problem with giving brief, vague answers to brief, vague questions.

...

continue : stops execution within a repeatable block of code and immediately "continues" execution at the first line in the top of the block.

break : stops execution within a repeatable block of code, "breaks" out of the block, and immediately continues execution from the next line of code after the block

return : stops execution of code within a function and "returns" back to the calling function, continuing execution at the first line of code after the function was originally called.

....

if you want more explicit answers, you'll need to formulate more explicit questions.

as ADAK said, no one will write code for you here.

.

arrrr why don't you search on the web, there are tutorials which you could explain everything. Well, what happened to your library books. But i thought i will nice to you today :). So here are some link which i thought is more reasonable

Break and Continue
Return

ssharish

people who post questions here don't want long tutorials. they just want the answers

:P

Be careful: brief answers are dangerous. For example, in actual fact continue pass contol to intermediate clause of for stmt and to while condition of while and do stmts; break in switch stmt does not break any repeatable code; return stmt also yields returned value in non-void functions...
IMHO, the forum is not a right place to explain basic semantics of traditional and well-defined language constructs.

i was being somewhat facetious. hence the :P face

but the fact remains:

these people are first year programming students -- if even that.

they can join the ACM forums later.


.

Sure. Then we could write your text book, your website tutorial, take your tests, etc.

I don't mean to be harsh, but we're not Google, we're not auditioning to be your tutor, and we're not a replacement for your text books.

Life is way too short for that. We did our homework or individual studying, and you should do yours. Don't take us for granted, please.

The way it works is YOU post your code or pseudo code that you're working on/having trouble with or don't understand, and we'll try to help you solve THAT problem, on your posted code.

sorry this is the first time im signing in this website.....thought technically anything can be asked........k in c,c++ pointers are greatly considered in most of the programs as it is said in books that it reduces the memory space and complexity in writing pgms.... but i can't understand how it reduces the memory space, cld u pls tel me abt this..............

This isn't the place for "can you tell me about some feature of C". This is *not* a lecture hall, and we don't have the time to be unpaid tutors.

You have to remember, there are a *lot* of students who post here.

Post your code, and tell us your problem with it - we'll try to help. That's what we do, and that's about all that we have the time to do.

I'm sure you can google just about any subject or question to find tutorial material on the features of C.

commented: you need to get over yourself -1
commented: Everyone makes mistakes, no need get personal +8

This isn't the place for "can you tell me about some feature of C".

Since when?

[...] and we don't have the time to be unpaid tutors.

Speak for yourself, I would say.
I do not restrict information of the knowledge I have been given by others. I impart it according to my judgment. Money is not an influence on it, time is not an excuse.
A little effort or interest by the poster, is motivation enough to trigger my enthusiasm to make she understand.

Post your code, and tell us your problem with it - we'll try to help. That's what we do, and that's about all that we have the time to do.

Again, speak for yourself. However, given the frequency that you seem to be around here, I would argue that you are not pressed by time.

I'm sure you can google just about any subject or question to find tutorial material on the features of C.

Google is overrated. The information might be there, but the amount of garbage you have to sort through at times is great. A consideration to take when you might want to judge someone of being lazy.

This isn't the place for "can you tell me about some feature of C". This is *not* a lecture hall, and we don't have the time to be unpaid tutors.

You have to remember, there are a *lot* of students who post here.

Post your code, and tell us your problem with it - we'll try to help. That's what we do, and that's about all that we have the time to do.

I'm sure you can google just about any subject or question to find tutorial material on the features of C.

damn, dude. lighten up already. this place isnt for you to vent your frustrations on some hapless student for asking legitimate questions. Yeah, perhaps he framed his question a little oddly (it did seem like he wanted code) but there is nothing wrong with asking questions on how C functions work.

because that's the purpose of this place: for students (and professionals) to ask C programming questions. Now if you dont have time to answer these questions, that's your business. don't answer them, okay?

but maybe you should spend more than a month here before you decide who this place is and isn't for.

.

commented: nicly put :) +34

damn, dude. lighten up already. this place isnt for you to vent your frustrations on some hapless student for asking legitimate questions. Yeah, perhaps he framed his question a little oddly (it did seem like he wanted code) but there is nothing wrong with asking questions on how C functions work.

because that's the purpose of this place: for students (and professionals) to ask C programming questions. Now if you dont have time to answer these questions, that's your business. don't answer them, okay?

but maybe you should spend more than a month here before you decide who this place is and isn't for.
.

He's hapless, or just acting helpless? His help file, his man file, his book, his notes, google, etc., have no info on continue, break, or return?

Hahahahaha! :D :D

Would you like to answer more homework questions for the student, without him even trying to answer them, himself?

I have no problem with answering a question about C. I have a problem when the student doesn't even try to explain what he/she thinks a continue or break, or return, could be used for, or post any snippet of code relating to any of these statements.

When it comes to teaching, I've been doing it since before you were born, Jepthah. You have to strongly encourage a good work ethic in a student, if they're to be their best.

If this forum is to be it's best, it needs to encourage that work ethic as well, in the posters. Ask your most experienced forum members, like Narue, Salem, or Ancient Dragon, etc.. They know.

I'm closing this thread because its turning into just a flame war.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.