Concept explainers
What is the output produced by the following lines of
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Absolute Java (6th Edition)
Additional Engineering Textbook Solutions
Starting Out with Python (3rd Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Java: Early Objects (6th Edition)
Computer Science: An Overview (12th Edition)
- 5- What is the output for y? int y = 0; for (int i = 0; i< 10; ++i) { y +=i; } cout << y;arrow_forward#include <stdio.h> int main(){float a =3e-1,b=2e-2;printf("a=%f b=%f",a,b);return 0;} note : what is e is here , explain brefily and what is output of the code.arrow_forwardGiven the following code, what is the value of *p? int i;int *p;i = 5;p = &i;arrow_forward
- #include <stdio.h>int main(){int i, j, k=0;for (i=1; i<3; i++){for (j=1; j<3; j++){k = i+j;printf("Value of k is %d\n" ,k);}}printf("Value of k is %d\n",2*k);return 0;} how do you modify this code so k only prints even numbersarrow_forwardint i=0; while(i<10) { printf(“I am inside the loop”); } What is wrong with this block of C code? Mark the errors and fix them.arrow_forwardint test(int *x, int y){ x=&y; return(*x+y); } int main(void) { int x=1, y=6; test(&y, x); printf("%d %d %d", x, test (&y,x),y); return 0; } 1 2 6arrow_forward
- What is wrong in the following code? int x; int* const p = &x; int y; p = &y;arrow_forwardint x = 8, y = 3, z = 5; x += x + y * z + z * z; printf("%i\n", x); // what is the outputarrow_forwardRewrite the following code segment using the conditional operators (?/:) if (x > y) Z = 1; else z = 20;arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education