Question
3,4,5,6,7,8 please
1. Enter the code to prompt a user to enter their name into a script and save to name. imputl name) 2. Enter the code to disp
0 0
Add a comment Improve this question Transcribed image text
Answer #1

3.

#include <stdio.h>  

main(){  

   fp = fopen("madhu.txt", "w");  

   fprintf(fp, "Hello file by fprintf...\n"); // fprintf statment.tmaj

}  

4.

Disp: Disp is a command and it displays the output on the screen

disp ( name of the variable );

disp ( ' text as string ' );

fprintf: it is also a command and that will helps to display the output the data or the text and later it can save the file.

fprintf ( ' typed text in the string' );

5.

fprintf: it is also a command and that will helps to display the output the data or the text and later it can save the file.

syntax :

int fprintf(FILE *fptr, const char *str, ...);

fprintf ( ' typed text in the string' );

sprintf:

It is the string Function based one that will help for instead of printing the output on the console it can store the result in the buffer store and that can be presented in the StringBuffer

syntax:

int sprintf(char *str, const char *string,...); 

6.

Function Table Major Feature :

The Function table will help us to print and displays the inputs.

And printing of the Inputs can be corresponding to the functions of the output.

Add a comment
Know the answer?
Add Answer to:
3,4,5,6,7,8 please 1. Enter the code to prompt a user to enter their name into a...
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
  • Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y =...

    Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y = sin(x) from x = 0 to 21. 12) Plot the functions y = x2 z = x2 + 2x + 1 from x = 0 to 2 on the same graph. Scripts: Input and Output 13) Write a script (M-file) to read in a message at the command line using the MATLAB input function and then display the message to the Command Window using...

  • 1) Write a MATLAB script to prompt a user to input two numbers, then assess whether...

    1) Write a MATLAB script to prompt a user to input two numbers, then assess whether the two numbers are equal or not. If the two numbers are equal, display that they are equal in the Command Window. If they are not equal, display that they are not equal in the Command Window. 2) Write a MATLAB script that prompts the user to enter the day of the week using the input function. If the information the user enters is...

  • for python-3 I want to prompt the user to enter their first name and then Call...

    for python-3 I want to prompt the user to enter their first name and then Call the is_field_blank function to see if nothing was entered.and If nothing was entered i want it to display the following message "First Name must be Entered" and then re-prompt the user to enter the first name. I want it to do this repeatedly until the user enters a first name. this is what i have so far def main():     yourFirst = input("What is...

  • MATLAB script 1) Prompt the user for their first name 2) Prompt the user for their...

    MATLAB script 1) Prompt the user for their first name 2) Prompt the user for their last name 3) Prompt the user for their age Display a sentence that greets the user using their first and last name, and congratulates them for what will be their age on their next birthday. Example: Hello John Smith. Congratulations on turning 45 on your next birthday!

  • Write a perl script to accomplish following tasks: 1. Prompt user to enter their name and...

    Write a perl script to accomplish following tasks: 1. Prompt user to enter their name and age, and then calculate and display their age in days. 2. Initialize a 20-element array of numbers and print each element. 3. Get a system host name. 4. Get a web page and save it to a file. 5. List background services (daemons) on your system.

  • C++ please! (1) Prompt the user to enter the name of the input file. The file...

    C++ please! (1) Prompt the user to enter the name of the input file. The file will contain a text on a single line. Store the text in a string. Output the string. Ex: Enter file name: input1.txt File content: We'll continue our quest in space. There will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. Nothing ends here; our hopes and our journeys continue! (2) Implement a PrintMenu() function,...

  • Please code following question in Java. Q) Prompt the user to enter the first initial of...

    Please code following question in Java. Q) Prompt the user to enter the first initial of their first name. Then prompt the user to enter their full last name. Then prompt the user to enter the last 4 digits of their student ID.

  • Please provide MATLAB code and comments! Please provide MATLAB code and comments! Please provide MATLAB code...

    Please provide MATLAB code and comments! Please provide MATLAB code and comments! Please provide MATLAB code and comments! Question #5. Write a script that creates a variable called BALANCE that is assigned the value 100.00. Then prompt the user to enter an amount to withdraw. Store that amount in a variable called WITHDRAW. Use an if/else construct to display a message to the user stating whether the withdrawal was successful. If the withdrawal would result in a negative balance, state...

  • Y F G Prompt and Store. 5. Prompt the user with "Enter your weight in pounds:...

    Y F G Prompt and Store. 5. Prompt the user with "Enter your weight in pounds: "message and store in the weight variable. 6. Initialize an int variable named heightIn Inches to feet OſHeight times 12 plus Inches OfHeight. 7. Initialize a double variable named BMI to weight * 703.0 heightIrinches El VB 8. Initialize a double variable named ratio to height In Inches? 703.0 9. Initialize a double variable named lower Normal to 18.5 times ratio. 10. Initialize a...

  • MATLAB QUESTION 8) Create a program that first prompts the user to enter any two numbers....

    MATLAB QUESTION 8) Create a program that first prompts the user to enter any two numbers. Then prompt the user again to input as many numbers as they choose. Stop the program by inputting-1. Then, display the largest number and second largest number in the command window once the user kills the program. The built-in max function cannot be used. The figure below is an example of what the command window should look like when the code is ran. First...

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