Topic: c | |
---|---|
what is the most important concept in C ?
is it pointers , functions or arrays |
|
|
|
|
|
|
|
what is the most important concept in C ? is it pointers , functions or arrays |
|
|
|
c is what you mark when you aren't sure there is a high percentage chance the answer will be C
|
|
|
|
Definately Functions.
You don't want all your code to be in the main part, because its a ***** to find when you've gotta change something. put each thing that does something different into a different function so when you need to change the part that calculates tax and don't want to mess up the part that calculates the sales price, you don't screw up. Easy. |
|
|
|
c is what you mark when you aren't sure there is a high percentage chance the answer will be C |
|
|
|
Definately Functions. You don't want all your code to be in the main part, because its a ***** to find when you've gotta change something. put each thing that does something different into a different function so when you need to change the part that calculates tax and don't want to mess up the part that calculates the sales price, you don't screw up. Easy. iam just a beginner . i have learned till looping. so suppose i have to get this output A B C D E F A B C D E A B C D A B C A B A HOW CAN I GET THIS OUPUT USING LOOP STATEMENTS |
|
|
|
Its been forever since i've programmed man, all i can suggest is using a counter, and many many many lines of code.
|
|
|
|
Its been forever since i've programmed man, all i can suggest is using a counter, and many many many lines of code. OK I WILL TRY |
|
|
|
Couldn't you use an array/loop?
|
|
|
|
I'm not a C programmer, but I can give you the concept.
Character array with values A,B,C,D,E,F as cArray Then you create a for loop as below nLoop INT nLoop = 6 while nLoop > 0 For y = 1 to nLoop print cArray(y) next y print CRLF nLoop -= nLoop loop |
|
|
|
Mayn,
I wish I was that smart.. xD All I can do is HTML and BBCode. lawlz. ...those A R E different, right? xD |
|
|
|
Mayn, I wish I was that smart.. xD All I can do is HTML and BBCode. lawlz. ...those A R E different, right? xD HTML and BBCode aren't really programming languages. Computer programming is mostly a way of thinking. If you can think the right way, you can program. When I started my classes for programming, one of the first questions I was asked was "How do you put a puzzle together". It's not what you know, it's all in how you think. So if you can't program, it's not a sign of you being less intelligent, it's a factor of how you think. You never know, if you haven't tried, you might have the necessary thought patterns to make a good programmer. |
|
|
|
Couldn't you use an array/loop? ya i can use arrays but i wnat to make it using loop statments |
|
|
|
Mayn, I wish I was that smart.. xD All I can do is HTML and BBCode. lawlz. ...those A R E different, right? xD what are these? i have to get this output using C language (with compiler as C turbo) |
|
|
|
Couldn't you use an array/loop? ya i can use arrays but i wnat to make it using loop statments I'm saying you could use an array, and then cycle through it using loop statements. |
|
|
|
Couldn't you use an array/loop? ya i can use arrays but i wnat to make it using loop statments I'm saying you could use an array, and then cycle through it using loop statements. ok |
|
|
|
Here is the code in C#, this should get you started.
tbTest is a text box on Form1. string sString = "ABCDEF"; int nLoop = 6; while (nLoop > 0) { tbTest.Text = tbTest.Text + sString.Substring(0, nLoop) + "\r\n"; nLoop -= 1; } |
|
|
|
c is what you mark when you aren't sure there is a high percentage chance the answer will be C sex |
|
|
|
uhhh...does this have something to do with ionic pulse warp drive?
|
|
|