How many times does the message, “Hello” get printed out by the code segment below?
int count = 0;
while (count < 41) {
printf(“Hello\n”);
count = count+3;
}
hello will be printed 14 times in the code given.
How many times does the message, “Hello” get printed out by the code segment below? int...
1. How many times does the message, “Hello” get printed out by the code segment below? int count = 0; while (count < 32) { printf(“Hello\n”); count = count+4; } 2. What is the value of sum at the end of the following code segment? int sum = 0, index; for (index = 0; index < 5; index++) sum += 5; Group of answer choices
3. How many times "hello" is get printed? for(int x=-1; x<=10; x++) { if(x < 5) continue; cout<<"hello"<<endl; }* (3 Points) 5 times 11 times Infinite times 6 times
In the code below,how many times "Hello" is going to be printed if the user enters 15 and 17 respectively? goal = int(input()) for lp in range(0,goal,3): print("Hello")
(a)How many times does the code snippet given below display "Hello"? int x = 1; while (x != 15) { System.out.println ("Hello"); x++; } (b)What is the output of the following code fragment? int i = 1; int sum = 0; while (i <= 5) { sum = sum + i; i++; } System.out.println("The value of sum is " + sum); Quie 2 What is the output of the following snipped code? public class Test {...
1-Is it possible to run a program without a main() function? Yes No 2- How many main() functions can one have in a program? 2 This depends on what compiler you use. As many as you like 1 3- What does the following code fragment leave in x? char a = 'A'; int x = sizeof (a); 1 Depends on what compiler you use. 4 2 4- True or false: In a C program I can have two functions with...
What is printed when the following code is executed? #include <stdio.h> int main() { for (int i=3, j=5; i>=0; i-=2, j+=j*i) { printf("%d", j); منم }
5) What is the value of the variable answer after the code segment below completes? int a, b, c; answer, a 3*b: b 5 10: c (a a b*b) / (c*c) answer = A).5 B) 2 C) 2.5 D) 250 ENone of the Above 8) What is the output of the following segment of code? int a 7, b= 3, c = 6 if (a> b c) printf"A"); if (b > a - с) printf ("B"); else printf("C") if (atb...
6. How many times does this code print "hello"? Note that execl is a wrapper over the execve system call, which executes the echo program. Assume that execl is always successful. int main(int args, char **argv) { int i; for (i=0; i < 3; i++) { exec1("/bin/echo", "echo", "hello", o);
computers. 1. How many times will this loop repeat? include <stdlib.h> #include <stdio.h> void main(void) int 10 for(= 0; i < 101) printf("d", 1); A. 10 times B. 1 time C. It will run forever D. 0 times 2. What will be the output of this program? #include <stdlib.h> #include <stdio.h> int main() int a = 100, b = 200, C = 300; if(!a >= 500) b = 300; C = 400; printf("%d, 8d, &d", a, b, c); return 0;...
In the code given below, how many times the cout statement is executed? for (int x = 0; x< 10; x++) for (int y=0; y < 10; y++) for (int z = 0; z <=10; z++) cout << X+y+z;