answersLogoWhite

0


Best Answer

You've forgotten this line:

#include <stdio.h>

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the cause of an error msg printf should have a prototype in C compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What does this compiler error mean ' ' in java?

Simply, the error that your compiler catches is called compiler error. Doesn't matter if you are in Eclipse, NetBeans or Intellij IDEA, all these IDE's are very smart. They can detect if you made any any mistakes in your program. Common compiler errors are- -When you try and access a variable that is out of scope -When you forget to give a semicolon. -When you will try to use a reserved keyword like - return. -Any syntax error that your compiler might find suspicious, will cause compiler to throw an error.


What is mean final class and final variable?

A final variable cannot have its value changed. It is used to define a constant. Assigning a value to a final variable after it is declared will cause a compiler error. A final class cannot be sub-classed. It is used to prevent rogue programmers from sub-classing your classes and changing their behavior. Trying to extend a final class will cause a compiler error.


What do you understand by the word indentation in programming language?

Indentation means to represent the coding in a readable format. for example: void main() { int i=0; if(i==0) { printf("%c\n", 'A') } else { printf("%c\n", 'B') } getch(); } the above program is not properly readable cause it don't have indentations like the below one void main() { int i=0; if(i==0) { printf("%c\n", 'A') } else { printf("%c\n", 'B') } getch(); } don't go for what this program is doing, it's just an example.


What is the difference between In line Function and Preprocessed in c plus plus?

An inline function is one where the compiler substitutes the body of the function for its invocation. By doing this, the compiler avoids the cost of setting up and tearing down a function call. This is most effective when dealing with small, one or two line, functions. A preprocessor macro does the same thing, except that the main compiler never "sees" the original invocation. Again, this is most effective when dealing with small functions. Is there a difference? Yes and no. The two methods can result in the exact same object code, but (with macros) you lose type checking and other checking of various "problems", such as side effects, that can cause your code to work in an unexpected fashion. THese side effects can be difficult to diagnose with macros, because you don't directly see what is actually being compiled. The down side of both methods is that you have duplicate code in each place. The up side is speed. The inline attribute is a compiler "hint". The compiler can choose to ignore it. By letting the compiler choose, you can gain performance and/or code size benefits, so it is better to go with inlining - that way, the compiler can catch problems before they become difficult to solve.


How do you copy a string without using string functions?

There is almost nothing to explain if you know C Language. Here is the program:#include void copyString(const char *src, char *dest);int main() {char str1[100];char str2[100];printf("Enter the string: ");gets(str1);copyString(str1, str2);printf("Copied string: %s\n", str2);return 0;}void copyString(const char *src, char *dest) {while (*dest++ = *src++);}As you can see actually copying is done in just one line of code. While loop stops after it reaches zero value and all strings in C language are null-terminated strings (ending with 0x00 byte at the end of string, which is zero).Testing:Enter the string: Hello world, we have copy function for string!Copied string: Hello world, we have copy function for string! Note: You should not be using gets() in real application, because it is not possible to limit number of the characters to be read thus allowing to overflow buffer. You might get a warning in line with our while loop if you are compiling with -Wall option in GCC, what does -Wall is that it checks for questionable places. This place for compiler is questionable because we have assignment operation inside while loop expression. Most of the times this is common mistake in programming, but not in this situation. Compiler just give a notice for developer that we should be careful.

Related questions

What does this compiler error mean ' ' in java?

Simply, the error that your compiler catches is called compiler error. Doesn't matter if you are in Eclipse, NetBeans or Intellij IDEA, all these IDE's are very smart. They can detect if you made any any mistakes in your program. Common compiler errors are- -When you try and access a variable that is out of scope -When you forget to give a semicolon. -When you will try to use a reserved keyword like - return. -Any syntax error that your compiler might find suspicious, will cause compiler to throw an error.


What process adaptations are required if prototype will involve into a deliverable system or product?

"What process adaptations are required if the prototype will evolve into a deliverable system or product?"


What is mean final class and final variable?

A final variable cannot have its value changed. It is used to define a constant. Assigning a value to a final variable after it is declared will cause a compiler error. A final class cannot be sub-classed. It is used to prevent rogue programmers from sub-classing your classes and changing their behavior. Trying to extend a final class will cause a compiler error.


Should you allow your 13-yr-old son to play Prototype or Just Cause on the xBox 360?

It would really depend on how mature that they are. I personally am 13 and i play the Call of Dutys and Gears of War 2, but its pretty much just if you think they can handle the content of the game.


Why do designers make prototype models?

To help find design flaws before proceeding to manufacturing.


What do you understand by the word indentation in programming language?

Indentation means to represent the coding in a readable format. for example: void main() { int i=0; if(i==0) { printf("%c\n", 'A') } else { printf("%c\n", 'B') } getch(); } the above program is not properly readable cause it don't have indentations like the below one void main() { int i=0; if(i==0) { printf("%c\n", 'A') } else { printf("%c\n", 'B') } getch(); } don't go for what this program is doing, it's just an example.


Why should parallax errors be avoided?

parral error should be avoided cause it can cause a disaster


What is the difference between In line Function and Preprocessed in c plus plus?

An inline function is one where the compiler substitutes the body of the function for its invocation. By doing this, the compiler avoids the cost of setting up and tearing down a function call. This is most effective when dealing with small, one or two line, functions. A preprocessor macro does the same thing, except that the main compiler never "sees" the original invocation. Again, this is most effective when dealing with small functions. Is there a difference? Yes and no. The two methods can result in the exact same object code, but (with macros) you lose type checking and other checking of various "problems", such as side effects, that can cause your code to work in an unexpected fashion. THese side effects can be difficult to diagnose with macros, because you don't directly see what is actually being compiled. The down side of both methods is that you have duplicate code in each place. The up side is speed. The inline attribute is a compiler "hint". The compiler can choose to ignore it. By letting the compiler choose, you can gain performance and/or code size benefits, so it is better to go with inlining - that way, the compiler can catch problems before they become difficult to solve.


Should this cause diarrhea?

Yes, this should cause diarrhea. That also has been known to cause diarrhea. Inversely, the other has been observed to have a constipatory effect.


Why do people want uniform and why not?

Why they should cause there stupid why not cause there not stupid


Is soy bean cause infertility?

Soy beans should not cause infertility in anyone. If you are concerned, you should speak with your doctor.


Can Nyquil cause a vaginal rash?

NO, Nyquil should not cause a rash. If it does then medical attention should be sought out immediately!