Question:
easy c++ programming question?
anonymous
2013-03-10 00:23:23 UTC
With regard to compiler warnings that occur when you try to compile a C program, which of the following is correct?

a) compiler warnings indicate possible semantic errors that should be identified and corrected if possible.

b) compiler warnings indicate that your computer is running out of memory.

c)none of the other answers are correct.

It would help greatly if you guys can tell me which of the above option is correct(a/b/c) and give a brief explanation. Thank you.
Four answers:
Shady
2013-03-10 01:55:25 UTC
C is fully backwards compatible with C++ given that you are using fully portable code.



Example: fflush(stdin) flushes the input stream. It works on a Windows platform but does not work on a Linux/Unix platform.



A would be your correct answer.
?
2013-03-10 00:42:46 UTC
A.



Reason:



Compiler warnings have nothing to do with your computers memory, even if some compilers do report it during compile time (I don't know of any that do). The reason that "A" is correct is because if you were to type:



int a = "error";



The compiler would report that the integer cannot hold a string value.
Mohammad
2013-03-10 01:54:06 UTC
A is correct for sure.

A compiler error almost always shows a problem in the syntax of the code.
?
2016-10-03 02:47:16 UTC
that is complicated in comparison to different languages that are in trouble-free use at present yet its nevertheless an exceptionally comprehensible language to verify, you will possibly be greater desirable of leaping directly into c++. could be somewhat not common in case you don't be conscious of the different language. i began discovering c at proper to a similar age as you yet already knew undemanding which made lots of the recommendations somewhat much less demanding to comprehend


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...