how do i write a C programm with the output
++++++ or *******
locy 0 Newbie Poster
Recommended Answers
Jump to Posthow do i write a C programm with the output
++++++ or *******Give it as an argument to the printf() function, or learn how to use a loop.
Jump to Postsomething like this:
for(int i=0; i<10; i++) { printf("*"); // it will print '*' 10 times }
Jump to Postsomething like this:
for(int i=0; i<10; i++) { printf("*"); // it will print '*' 10 times }
for(int i=0; i<10; i++) /* Not proper C syntax */
int i; for ( i = 0; i < 10; i++ ) /* correct syntax */
Jump to Post>for(int i=0; i<10; i++) /* Not proper C syntax */
Not proper C89 syntax. C99 supports this feature.
All 15 Replies
Aia 1,977 Nearly a Posting Maven
mostafadotnet 18 Junior Poster
Aia 1,977 Nearly a Posting Maven
Narue 5,707 Bad Cop Team Colleague
Lardmeister 461 Posting Virtuoso
Aia 1,977 Nearly a Posting Maven
Lardmeister 461 Posting Virtuoso
Aia 1,977 Nearly a Posting Maven
Lardmeister 461 Posting Virtuoso
Narue 5,707 Bad Cop Team Colleague
dwks 149 Posting Whiz in Training
Aia 1,977 Nearly a Posting Maven
Narue 5,707 Bad Cop Team Colleague
Aia 1,977 Nearly a Posting Maven
Lardmeister 461 Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.