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...

  • Can someone help me with a simple C programming problem? How do I make some code...

    Can someone help me with a simple C programming problem? How do I make some code like this into its own function? Currently it's pat of the main function, but I want to be able to call it. If you could help me with the prototype, function call, and definition, I'd really appreciate it. Thanks!    if(some_input=='r'){ someone = 0; } else if(some_input=='p'){ someone = 1; } else if(some_input=='s'){ someone = 2; } else if(some_input=='q' || some_input=='Q'){ break; // Breaks...

  • 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...

  • 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') {...

  • CSC331: Data Structures NOTE: Please read the instructions carefully. If you do not understand please do...

    CSC331: Data Structures NOTE: Please read the instructions carefully. If you do not understand please do not attempt to answer the question. This is Data Structure. The question is not asking to write a C++, the C++ code is already provided. The question is asking to use COMMAND PROMPT find the cpp file where the code is written, display the message “Hello World!” through COMMAND PROMPT. Then using COMMAND PROMPT to also output the message “Hello World!” into a text...

  • 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...

  • In C programming. How do you build a calendar? I can't get the days to work...

    In C programming. How do you build a calendar? I can't get the days to work right. This is what I have so far #include <stdio.h> #include <string.h> #include <stdlib.h> int dow(int year, int month, int day) {     static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};     year -= month < 3;     return (year + year/4 - year/100 + year/400 + t[month-1] + day) % 7; } int main() {...

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