maybe it would help to think of it this way:
function do_something(arg1, arg2){
if (true):
do_this()
else: //if false
do_that()
Type: Posts; User: caroundw5h
maybe it would help to think of it this way:
function do_something(arg1, arg2){
if (true):
do_this()
else: //if false
do_that()
which means the problem probably has to do with the statements before - since your printf() is called correctly. You may find this link helpful in the future. I find it handy.
Why do you want a certification exactly? Honestly open source work on projects will get you further than having a certification, in my experience and IMHO. Go work on one of those and building you...
Ahh the popular phrase is "School is a place where former A students teach mostly B students to work for C students"
As for your question, google is your best friend in this. However you can also...
One of my favorite quotes is by the mathematician Morris Kline He says "When the concrete cases are understood, the abstractions are readily made" I live by this quote and would highly suggest If you...
Are you saying his code was easier to read or yours? I've come across the use of the ternary operator like this a number of times in production code and it irritates the hell out of me. Even if it is...
We all were at one point and if you're paying attention you realize you learn something new everyday. C is a succint language but has many subtleties that can lead to unintended consequences. The...
...and seemingly from Harvard University no less. smh. Wow.
alternatively
#include<stdio.h>
int main(void){
int num;
int counter, total;
total = counter = 0;
the prototypes are there for what laserlight said. As well another usage is so that your compiler knows exactly how much space to allocate based on the types you give as arguments. If you don't want...
seems like you are familiar with pointers though so I'm assuming you've also done functions. If so, consider making your program more modular and creating functions to find the given string and such....
remove
<conio.h> as it's a non standard header. As well remove your call to
getche() and simply call
getchar();
you may need a few more calls to getchar() - i haven't ran your code - or...
Doesn't look like he's expecting any command line arguments so it might be better to simply
int main(void){...}
As well main always returns an int.
I know there are windows versions for GTK+, is there one for QT and Fltk? I noticed the OP said he was on windows 7.
I can't help but wonder if this user isn't in the same place where all the outsourcing is going, threatening real programmers jobs.
You need to indicate to your input statements which struct in the array you want to populate with the information. So give your scanf statement an index.
Also check your for loop. You declare an...
Yaswanth, No one on the board will write this program for you but it is possible to write a program that does what you're looking for. Choose the language you're comfortable with and take it from...
Actually no, what's probably best is for you to post code and show us you've actually took steps towards solving your problem.
A quick check on your posts shows the majority of them related to...
From the comment in your code, it seems these may be practice exercises? if so I'd suggest attempting to solve the problem with the knowledge you've been taught up till now - from the book. The...
It's been sometime since I coded in C but assuming he does exactly as u say, he would be leaving scanf to expect a int and then store it in space reserved for a double...this would still not produce...
exactly.
not necessarily. All the compiler needs to know is the address of the first element of the array, and again the name of an array is the address of the first element in that array.
...
An array is a block of contiguous memory - meaning your most likely going to have more than one element in that array. Secondly, the name of an array is the address of the first element in that...
jackson6612, your error message is an indication as to what's wrong with your logic in the code.
in the prototype for display:
void display(Student dummystud[]);
you tell display to accept an...
lol. this really gets me mavado. But I understand where you're coming from so I'll help you out.
most modern languages that are in use today were made using C. These include C++, Java,...
Hahaha that was a great comment. I <3 that.
Anybody see a problem with it now?...no?...kay.
I'm done :)