Question

The output function printf() cannot be used in C++ programs.


The output function printf() cannot be used in C++ programs. 

  • True 

  • False

1 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer for the given question are as follows -

Question : The Output function printf() cannot be used in c++ programs.

Answer : false

Explanation : Printf() function is used to print the formatted string to stdout . The string format may contain format specifiers starting with % which are replaced by the values of variables that are passed to the printf() function as additional arguments.

Syntax - printf("%d",&i);

here %d for integer and & is used to pointer to int variable.

Add a comment
Know the answer?
Add Answer to:
The output function printf() cannot be used in C++ programs.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C Programming 6 1 point Which function(s) can be used to open a file? fread fopen...

    C Programming 6 1 point Which function(s) can be used to open a file? fread fopen fscanf fstream file.open fopens 7 1 point Which function(s), is/are used to write text to a file? fprintf printf write fseek fwrite 8 1 point Which preprocessor directive is used to make a macro? #define #ifdef #include #macro #directive 1 point You cannot write the field values of a structure variable to a file. True False 10 1 point You can use the standard...

  • Assignment: Show the symbol table for the following C programs at the printf lines (a) using lexi...

    Assignment: Show the symbol table for the following C programs at the printf lines (a) using lexical scope and (b) using dynamic scope. What does the program print using each kind of scope rule? Program 1: const int b = 10; int foo() {    int a = b + 10;    return a; } int bar() {    int b = 4;    return foo(); } int main() {    printf(“foo = %d\n”,foo());    printf(“bar = %d\n”,bar());    return 0; } Program 2: int a;                 void...

  • Please i need programs in C 32) Write a function that, given a string, a width,...

    Please i need programs in C 32) Write a function that, given a string, a width, and an empty string for output, centers the string in the output, centers the string in the output area. The function is to return 1 if the formating is successful and 0 if any errors, such as string length greater than width, are formed. 35) Write a function called newStrCmp that does the same job as strcmp. The declaration for your functions is to...

  • on C: What flag in the printf() fomat control string is used to left justify the...

    on C: What flag in the printf() fomat control string is used to left justify the output within the specified field?    #     -     +     (space)

  • Youth court programs a. Involve multiple-level supervision b. Involve peers to determine the appropriate sentence c....

    Youth court programs a. Involve multiple-level supervision b. Involve peers to determine the appropriate sentence c. Are the most effective at reducing recidivism rates d. Employ a victim- and community-centered approach Research indicates that offenders who participate in work release programs are more likely to find and maintain employment upon release. True False Diversion programs increase the number of cases formally processed. True False Most people who receive bail cannot afford it. True False Restorative justice diversion programs are the...

  • In C language 5. What is the OUTPUT of each of these programs? If you aren't...

    In C language 5. What is the OUTPUT of each of these programs? If you aren't confident of an answer, type mpile and run the program to test it. (a) <stdio.h> #include int main main int count; int sum0; for (count 1; count10; count++) sum sum+ count; for count printf("sum= %d\n", return 0; sum); )main (b) #include int main ) <stdio.h> main/ int count; int sum -0 for (count 1 count10; count 2) sum sum + count; for count print...

  • In C, while loop cannot be used to manipulate one-dimensional arrays. True or False

    In C, while loop cannot be used to manipulate one-dimensional arrays. True or False

  • The correct C statement to close an input or output file is closef. True False In...

    The correct C statement to close an input or output file is closef. True False In C, fscanf() is used to: print data to the computer screen. read in data from a file. read input from the keyboard. write data to a file. To read data from an input file in C, you would use: scaff fscanff fscan fscanf What is the C statement required to send output to a data file? fprintf printff printf writef When a file nointer...

  • 7 - What does the code print to the screen? float x(float) 7/3; printf ( "...

    7 - What does the code print to the screen? float x(float) 7/3; printf ( " % .2 f", x); a) 7/3 b) 2.50 c) 2.00 d) None of the above a) TRUE b) FALSE c) TRUEFALSE d) None of the above 8 - What does the code print to the screen? int x3; if (x >31x!-2 printf ("TURE") printf ("FALSE"); 9What does the code print to the screen? a) TRUETRUE b) TRUE c) TRUETRUETRUE d) TRUETRUETRUETRUE e) None of...

  • Question 31 In C, what is the computational result of 8/5*2.5? Question 32 Examine the for...

    Question 31 In C, what is the computational result of 8/5*2.5? Question 32 Examine the for statement given below. What is the most correct answer given below? for(degrees==0.0; degrees<=360.0; degrees+=20.0) ( ) Degrees must be in radians. ( ) Degrees must be capitalized. ( ) Cannot use double equal signs for assigning values to variables. ( ) Degrees cannot be incremented in the manner shown. Question 33 In a C program the formal and actual parameters that are used between...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT