(OnlineGDB) 1. Please read and run the following code and answer the questions.#include <stdio.h>int main(void) {int a;char *s;int v0 = 4, v1 = 5, v2 = 6, v3 = 1, v4 = 2;printf("Exercise 1:\n====================\n");switch(v0) {case 0: printf("Hello October\n"); break;case 1: printf("Go Kean!\n"); break;case 2: printf("Academic Building Center \n"); break;case 3: printf("UNION \n"); break;case 4: printf("Go ");case 5: printf("Kean! \n");default: printf("Have a great semester! \n"); break;}for(a=5; a<v1; a++) {printf("Kean");}printf("\n");if (v2 == 6) {s = "Go";}else {s = "Hello";}if(v3 != v4) {printf("%s Kean!\n",s);} else {printf("%s Computer Science!\n",s);}return 0;}   What is the output of the program? Please explain why.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 17RQ: When you perform arithmetic operations with operands of different types, such as adding an int and a...
icon
Related questions
Question

(OnlineGDB)

1. Please read and run the following code and answer the questions.
#include <stdio.h>
int main(void) {
int a;
char *s;
int v0 = 4, v1 = 5, v2 = 6, v3 = 1, v4 = 2;
printf("Exercise 1:\n====================\n");
switch(v0) {
case 0: printf("Hello October\n"); break;
case 1: printf("Go Kean!\n"); break;
case 2: printf("Academic Building Center \n"); break;
case 3: printf("UNION \n"); break;
case 4: printf("Go ");
case 5: printf("Kean! \n");
default: printf("Have a great semester! \n"); break;
}
for(a=5; a<v1; a++) {
printf("Kean");
}
printf("\n");
if (v2 == 6) {
s = "Go";
}
else {
s = "Hello";
}
if(v3 != v4) {
printf("%s Kean!\n",s);
} else {
printf("%s Computer Science!\n",s);
}
return 0;
}

 

What is the output of the program? Please explain why.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT