#include<stdio.h>
int main(){
printf("%+-9.2f!!%4.1f!!%3.f!!%f!!%12.6s",2.67,1243.26,(double)9/5,(double)(9/5),"Goodbye!!!");
return 0;
}
Output:- +2.67 !!1243.3!! 2!!1.000000!! Goodby
Note:- Output stating with + (The space between output:- and + is just for indentation purpose).
Question 4 20 pts Predict the output of the following C program (use to explicitly show...
Question 5 10 pts Predict the output of the following C program: #include <stdio.h> void mainot double x[4] = (3.14, 1.62, 2.72,654.1); printf("%d %c %.f", (int)(100**(x+1)), (int)x[3]/10, x[2]); 12pt Paragraph BI UAB T2 : p O words
Question 3 Predict the output of the following C program: #include <stdio.h> void main() { int i = 0; for(; 1; i++){ printf("%d",i); if(i==7) break; } 12pt Paragraph 1 Β Ι Ο Αν και Ta
Question 8 Predict the output of the following C program: 5 #include <stdio.h> void binaryCode(int n) printf("1"); if(n=2) return; binaryCode(n-1); int i = 0; for(; i<n;i++) printf("O"); binaryCode(n-2); } void main() { binaryCode(3); 12pt v Paragraph Β Ι Ο Avor T²v ...
Question 2 Predict the output of the following program: #include <stdio.h> void mainot printf("%d %d %d" 10 > -1, (unsigned) 10 > -1, (unsigned) (10 > 1));
OPERATING SYSTWM Question 31 What is the output of this C program? #include #include void main() int mptr, *cptr mptr = (int*)malloc(sizeof(int)); printf("%d", "mptr); cptr = (int)calloc(sizeof(int),1); printf("%d","cptr); garbage 0 000 O garbage segmentation fault Question 8 1 pts If this program "Hello" is run from the command line as "Hello 12 3" what is the output? (char '1'is ascii value 49. char '2' is ascii value 50 char'3' is ascii value 51): #include<stdio.h> int main (int argc, char*argv[]) int...
Question 6 Predict the output of the following question: 8 pts #include <stdio.h> #include<string.h> char al(5)={ "gate", "kate","rate","date" ); void rec(char a[][5], int n){ if(n<= 1) return; char temp[5]; strcpy(temp'a);//copies the string stored in a into temp strcpy(*a,a[n-1]); strcpy(a[n-1),temp); rec(a+1,n-2); } void main() { rec(a 4); int i = 0; for(;i<4;i++) a[i][4]+= 10; printf("%s", a); }
Question 5 8 pts Predict the major product(s) for the following Diels-Alder reaction. Draw the reaction mechanism. ОН A + LOH 12pt Paragraph в I o А еті:
QUESTION 12 What is the output of the following program? #include <stdio.h> int main(void) printf("From sealnto shininginC"); O a. From sea to shining O b. From sea to shining O c. From seanto shining nC O d. From sea to shining C
What is the output of the following program? Show each step to get to the output #include <stdio.h> int f(int* a, int* b); int main() { int a = 6, b = 7, c = 8; b = f(&c, &a); printf("a = %d, b = %d, c = %d\n", a, b, c); return 0; } int f(int* a, int* b) { *a = *a + *b; *b = *a - *b; printf("a = %d,...
I NEED HELP WITH THE FLOWCHART AND PSEUDOCODES OF THIS PROGRAM PLEASE! +3) (5 pts) Show the screen output of running the following program. #include <stdio.h> Screen output: int f1(int, int); //function declaration void f2(int); int main() { printf("calling f1( ) ..\n"); int flResult = f1(7,-8); printf("flResult = %d\n", f1Result); }//main) int f1(int a, int b) { printf("in f1(): a = %d, b = %d\n", a, b); int data = -1; if (a >b) data = a - b: return...