Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output? What is the meaning of '?' and ':'here? void printStarsB(int numStars) { int i = 0; i = (numStars % 2

What is the output? What is the meaning of '?' and ':'here?

void printStarsB(int numStars) {

int i = 0;

i = (numStars % 2 == 1) ? numStars : numStars + 1;

while (i >= 1) {

int j;

for (j = 0; j < i; j++)

printf("*");

printf(" ");

i-=2;

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Students also viewed these Databases questions

Question

9) Display the major problem with VMs

Answered: 1 week ago

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago

Question

1. Describe the power of nonverbal communication

Answered: 1 week ago