Question

This question is for c programming My question is, How do you make a new line...

This question is for c programming

My question is, How do you make a new line that completely empty. I don't mean "\n". I actually mean skipping a whole line.

printf("Hello World");

//leave a blank line

printf("Hello World");

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

You try this:

#include<stdio.h>
int main()
{
   printf("Hello World\n");
   printf("\n");
   printf("Hello World");
}
you can get blank line by this or write printf("\n") two times and you can skip whole line

#include<stdio.h>
int main()
{
   printf("Hello World");
   printf("\n");
   printf("\n");
   printf("Hello World");
}
               

Output: it is same for two programs

Add a comment
Know the answer?
Add Answer to:
This question is for c programming My question is, How do you make a new line...
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 language: If you malloc, make sure to assert and free the data. please do...

    C programming language: If you malloc, make sure to assert and free the data. please do not call any function you don't write yourself other than: malloc, free, assert, sizeof, scanf/printf families (eg., sprintf, fprintf & printf all OK to use) Write a function whose only argument is the input string. The function should return a new string which consists of only the upper case letters from the original string. The new string should be allocated to use the minimum...

  • The programming language has to be C. Do you remember rand()? Do you remember how it...

    The programming language has to be C. Do you remember rand()? Do you remember how it can use srand() for a seed? Did you know that rand uses that seed as the initial state of their random number generator. Did you know that a random number generator is really a deterministic sequence generator? Yeah! So your next random number might be calculated using a recursive equation like: rand_n = rand_(n-1) * coeffecient1 + coeffecient2 That is the random number produced...

  • Hello, I have my piece of C programming code and I have a pointer initialized to...

    Hello, I have my piece of C programming code and I have a pointer initialized to point to my array and I need help to display the contents of my array using a while loop or do-while loop. The stop condition should be when the pointer reaches '\0'. The code is below: #include <stdio.h> int main () {    char array[80]; printf("Enter a string: "); scanf("%[^\n]", &array); printf("%s\n", array); char * p;    p = array;         }

  • Original question is above, and is for C programming. As you will see in my code...

    Original question is above, and is for C programming. As you will see in my code below, I am not sure how to properly implement the functions I made for g(x) and h(x) (I call them g_x and h_x) into my function called trap. I know that in my main function in my function call to trap, I have to put something in the parentheses of g_x() and h_x() since they both take a type double argument, however I'm not...

  • getchar() redirect to input textfile in ASCI C programming. Hello, underneath is the code I did...

    getchar() redirect to input textfile in ASCI C programming. Hello, underneath is the code I did and it works. However, my professor is asking to use getchar() and have an input text file to redirect it. How would i do that on my code? Thank you for the help. #include <stdio.h> #include <string.h> int main() { char string[100]; int c = 0, Lcase[26] = {0}, x; int Ucase[26] = {0};    printf("Enter a string\n"); gets(string); while (string[c] != '\0') {...

  • Please help me out with all the question. I really need help with all please help...

    Please help me out with all the question. I really need help with all please help i will surely give you thumbs up please with correct answer Question 1 (1 point) Saved Which identifier name below is illegal in C? |_10C 10C C10 All of them is legal Question 2 (1 point) You have the declaration as below int a = 0; Which line below will give you a warning when compiling? printf("%f", a); printf("%x”, a); printf("%0", a); All of...

  • In Programming language C - How would I convert my words char array into a string...

    In Programming language C - How would I convert my words char array into a string array so I can use the strcmp() function and alphabetically sort the words? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int main(int argc, char*argv[]){ int i =0; int j =0; int count =0; int length = strlen(argv[1]); for(i =0; i < length; i++){ if(isalpha(argv[1][i]) == 0 ||isdigit(argv[1][i] != 0)){ count ++; } printf("%c",argv[1][i]); } char *strings; int wordNum =0; int charNum =0; strings...

  • Language is in C. Need help troubleshooting my code Goal of code: * Replace strings with...

    Language is in C. Need help troubleshooting my code Goal of code: * Replace strings with a new string. * Append an s to the end of your input string if it's not a keyword. * Insert a period at the end, if you have an empty input string do not insert a period Problems: //Why does my code stop at only 2 input strings //If I insert a character my empty string case works but it's still bugged where...

  • I have a question regarding java programming. If I have this in a text file, "...

    I have a question regarding java programming. If I have this in a text file, " hey you <hello world> " How can I get it so that it only extracts the words in between the "< > " ? I am doing this with a stream and I know you can get it with the .map() function but I cannot figure out how to do it.

  • I'm having trouble understanding pointers in my c programming class. I posted the pointer assignment below....

    I'm having trouble understanding pointers in my c programming class. I posted the pointer assignment below. If you could leave comments pointing out where pointers are used it would be much appreciated! ----------------------------------------------------------------------------------------------------------------------------------- Write a complete C program for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of 10 dollars) and the machine dispenses this amount using the least number of bills. The bills dispenses are 50s, 20s, and 10s. Write a...

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