int main { char c 11 char d 12 printf("%d %d \n", c, d); printf ("%d \n" printf ("%d \n", c & d) d); C unsigned char n printf("%d %d \n", n, c); unsigned char m = d << 2; printf ("%d %d \n", m, d) C >3;
Q: char A,B.C: int F; A = 2; B = 6; C = -10; F= (A+B)*C; C= E+10:
A: F = (2 + 6) * -10 F = 8 x -10 F = -80
Q: Suppose x and y are int variables and symbol is a char variable. Assume the following input data:38…
A: [Note: We’ll answer the first three subparts of the question since the exact one wasn’t specified.…
Q: #include int main() { char a = '\012'; printf("%d", a); return 0; }
A: Please find the answer below :
Q: (Temperature Conversions) Write a program that converts integer Fahrenheit temperaturesfrom 0 to 212…
A: Answer: Program: * This C program is used to convert temperature * * Fahrenheit in ranging from 1 to…
Q: 1 + 2.0F + 3.0M Select the correct data type that the above expression evaluates to in C# O int…
A: In C# programming ,it is must to specify the suffix to use for the data type value to set whether it…
Q: int s=0, d, x-42; while (x > 0) { d x 8 10; s = s*10 + d; x = x / 10; cout << s < endl; O a. 34 O b.…
A: Initial value of x=42 The while loop will run till the point value of x>0.
Q: int t1 = 0, t2 = 1; // initialize the next term (3rd term) int nextTerm = t1 + t2; // get no. of…
A: THe answer is
Q: include int main() { char a = '\012'; printf("%d", a); return 0; }
A: Please find the answer below :
Q: def myF(): x = 2 %3D y = 10 %3D x+= y*x+1 return X print (myF ()) Select one, a. 20 b. 23 c None
A: The given code is: def myF(): x=2 y=10 x+=y*x+1 return x print(myF())…
Q: #include int main() { int x = 20; int y = 22; if (x<y) { printf("Variable x is less than y"); }
A: As x is less than y it enters if statement.
Q: main() { int i = 45, c; c = multiply (i* 1000); printf ("\n%d", c); } check (int ch) { } if (ch >=…
A: In the place of multiply(i*1000) we should place check(i*1000) because there is no predefined…
Q: main(){ int y=20; int x=20; int z; z=(x*y)-2; cout<<z;} C++
A: Output for the given c++ code is given below.
Q: while (i> 20);{Cout>>i;A program to print only 20 integer number * true O False if (x > 0) cout << "…
A: Answer: I have given answered in the handwritten format in brief explanation
Q: int main() { int a = 320; char *ptr; ptr =( char *)&a; printf("%d",*ptr); return 0; } (А) 320 (В) 60…
A: AS we know the values in memory can we stored in big endian and little endian format. In little…
Q: #include using namespace std; int fib(int n) { if (n >n; cout << "The next number in the Fibonacci…
A: Given To know about the C++ programing language.
Q: int function(int num1, int num2) { if (num2 == 0) return 1; if (num2 % 2 == 0) return function(num1…
A: the question tells us to trace the execution of the program. the program basically is recursive…
Q: c) int sum(int n) { if (0 == n) { return 0; } else { return n + sum(n); } } d) void product(void) {…
A: Given: We have to Find the error (s) in each of the following program segments.
Q: Can you please correct this code #include #using namespace std; int main() { int n;…
A: #include <iostream> #using namespace std; int main() { int n; cout<<"Enter:";…
Q: 1 char mein( int c, char i) // correct this statement c = 50; i = (char)c; cout << (int)c + i <<…
A: When we pass the parameter by the reference we pass the pointer address containing the value and…
Q: #include using namespace std; Bint main() {// Start // Declare variable char str[100] = "I am a…
A: Flow chart for the above c++ code is:
Q: #include main () { int x; float y; y = x = 7.5; printf("x=%d y=%f", x, y); }
A: Here we have given the code .we have to find the output for this.. Here first two line are…
Q: Program to remove errors */ #include int main() int num1, num2, num3; printf("enter first number…
A: Hint: - letters are case sensitive. semicolon is mandatory at the end of statements.
Q: int x = 8,y; forly 0; y<=3; y++) x/- 2; cout << x +x << endl;
A: In the above code, it has been asked to print , the input, output and the code screenshot along with…
Q: Q2: Complete the following code: def calc(a, b): # This function returns the sum and the difference…
A: def calc(a,b): return a+b,a-b
Q: Given the declarations int m = 25, n=77; char c = '*'; int *itemp; Describe the errors in each…
A: The Answer is in Below Steps
Q: void main() { 1. float A,B,C; 2. clrscr(); 3. printf("Enter number 1:\n"); 4. scanf("%f", &A); 5.…
A: Answer :-
Q: int s(int x, int y): int main() int a, b̟c; scanf(*%d %d",&a,&b); c = s(a,b); printf("%d",c); return…
A: The Answer for the c program is
Q: 3.main () { char a; int y; a=97; y=98; printf(“%c\n",x); printf(“%c\n",y); printf(“%c\n",a+2);}
A: Explanation: #include <stdio.h>int main(){ char a;//declaring character variable int…
Q: Find errors from the following statements: ) f (12+90<5+6 6) ii) If (5+-12 cn 8) i) char A "1"; iv)…
A: A computer language's syntax is a collection of rules that specify the symbol sequences that are…
Q: Show the printout of the following code: int i = '1';int j = '1' + '2';int k = 'a'; char c = 90;cout…
A: Show the printout of the following code: int i = '1';int j = '1' + '2';int k = 'a'; char c = 90;cout…
Q: int x = 40, y= 8; 1. Write a line of code to print 0 if x is an odd number. 2. Write a line of code…
A: int x =40, y=8; 1. line of code to print 0 if x is an odd number…
Q: #include int main() { int x = 1; if (x > 0) printf("inside if\n else if (x > 0) pnint f("incide…
A: The output of the given c code
Q: a. int c = 5 + (int) (Math.random () * 50); b. int c = 5 + (Math.random () * 50); 3) Which of the…
A: 1) option a. 5+(int)(Math.random()*50); generates random number from 5 to 54 both inclusive 2)…
Q: #include int main() { Y float n; printf("Enter Number: "); scanf("%f", &n); sq = n*n; printf("Cube…
A: Dear Student, I think you just want to print square of number instead of cube of number, the…
Q: The program segment has errors. Find as many as you can. // This code should add two user-entered…
A: Step 1:- Program:- #include <iostream>using namespace std;int main(){int num1, num2; char…
Q: Find the error(s), if any 1) void main() { int a = 15; float b = 10; char cha = 'a'; char chb =…
A: 1.) Following errors are present in the given code: //statement with error void main() Error: As the…
Q: a. int c -20 + (int) (Math.random () 60) ; 4) Which of the following statements generates a random…
A: We are going which is correct option to generate a random number between 20 and 80 both inclusive.…
Q: int a=10, b=15; test (b,a); test (a,b); cout<<a <<b<<endl; int test (int &x, int y) { x=66; y=44;}
A: Here &x denotes that first parameter is passed as reference and y means its passed by value. In…
Q: C++ main(){int i; int j; int y; i=9;j=3; y=(i/j)-(3*i^2)/9; cout<<y;}
A: #include <iostream>using namespace std; int main() { int i; int j; int y; i = 9;…
Q: * Q: Find the result main () {int x,number1, number2; cout>number1; cout>number2; x=…
A: As per the policy and guidelines of Bartleby we are supposed to answer only first question or the…
Q: For code below, r= int x=28; int r: r= x%5; printf ("%d", r);
A: Task :- find out the value of variable r for given code.
Q: What is wrong in the following function?
A: Answer: Explanation: In the above program, the function f() return type is void and does not return…
Q: int a=10 , b=3; int c=++b; printf("%d",c); O c=2 c=3 c=4
A: There are two code snippets given. 1) int a=10,b=3; int c=++b; printf("%d",c); Provide the…
Q: int a=10 , b=3; int c=++b;printf("%d",c); O c=2 c=4 c=3
A: Answer : - c = 4 Explanations : - here c = ++b is known as pre - increment. so here first value…
Q: X Q.The output of this program isint main () ( char namel]-"OOP using C++; cout<<"Name is "<<name;…
A: A. Solution for 1st mcq - Given : char name[] = "OOP using C++"; cout<<"Name is"…
Q: 5. main () { char a; int y; a=97; y=98; printf(“%c\n",x); printf(“%c\n",y); printf(“%c\n",a+2);}
A: code with comments: main(){ char a; //initializing charcter a int y; //initializing charcter…
Q: Write a program that asks the user to enter an integer and then display the hexadecimal…
A: The program that asks the user to enter an integer and then display the hexadecimal representation…
Q: main() { int n, i = 0, c; printf("Enter the number of terms\n"); scanf("%d", &n); printf("Fibonacci…
A:
Q: m=0; do Q/lf m is an integer variable, then when the following code is executed, the print output {…
A: Let us see the answer below,
Consider the following code. What will be printed out by the code?
Trending now
This is a popular solution!
Step by step
Solved in 9 steps with 6 images
- int x1 = 66; int y1 = 39; int d; _asm { } mov EAX, X1; mov EBX, y1; push EAX; push EBX; pop ECX mov d, ECX; What is d in decimal format?be recor #include #include minutes #include limit on int func(int, int, int, int); main(){ srand(time(NULL)); int a, b, c, fNum; printf("Choose three different numbers between 0-39:"); scanf ("%d%d%d", &a, &b, &c); fNum = func (a, b, c, 25); printf("\nThe result: %d", fNum); } int func (int ul, int u2, int u3, int iter){ srand (time (NULL)); int n1=0, i=0, count=0; for (;i#include <stdio.h>int main(){int d;int s[20],i, j, p, lg=0,m,t=0;char c;printf("Enter number of sale: ");scanf("%d", &d);for(i=0; i<d; i++){ printf("\n sales %d sales: ",i+1);scanf("%d", &s[i]);}for(i=0; i<d; i++){for(j=i+1; j<d; j++){if(s[i] > s[j]){p= s[i];s[i] = s[j];s[j] = p;}}}printf("\n sales lowest to highest: ");for(i=0; i<d; i++){printf("\nsales %d ", s[i]);}printf("\n highest: %d ",t);getch();} it should be: highest : 2000int main{void main} { int myArray[100],numint,result; printf("How many numbers to be entered?"); scanf("%d"&numint); getNumbers(myArray,numint); printNumbers(myArray,numint); result=sumNumbers{myArray,numint}; printf("Sum of numbers entered=%d",result); return 0; } Based on this program, write down the function prototype for below. Write the function getNumber(), printNumbers() and sumNumbers().int main{void main} { int myArray[100],numint,result; printf("How many numbers to be entered?"); scanf("%d"&numint); getNumbers(myArray,numint); printNumbers(myArray,numint); result=sumNumbers{myArray,numint}; printf("Sum of numbers entered=%d",result); return 0; } Based on this program, write down the function prototype for function getNumber().draw flow char for this code is easy 2 #include 3- int main() { 4 char c; 5 6 7 8 9 ▾ 10 11 12 13 14 15 16 17 18 19 20 21 22 23 } printf("Enter a character: "); scanf("%c", &c); // Convert Lowercase to uppercase and vice versa if (c >= 'a' && c = 'A' && c <= 'Z') { c = c + 32; // Convert uppercase to Lowercase } 2. Write a C program that ask the user to enter a character then the program will print the input character and the next characters in ascending order up to character 'Z'. (Note: if the user enters lower case character, the program will print lower case character and vice versa) } // Print the character and subsequent characters in ascending order while (c <= 'Z') { printf("%c ", c); C++; 32; // Convert Lowercase to uppercase printf("\n"); return 0; Enter a character: v V W X Y Z inputvoid funOne(int a, int& b, char v); void main() { int num1=10; char ch='A'; funOne(num1, 15,ch)<#include using namespace std; int main () int x, y; { X = 5; y = ++x cout << x << y; %3D ++x; %3D x = 5; y = x++ * ++x; cout << x < y; return e; } 525636 747953 749735 636636Match the C-function on the left to the Intel assemble function on the right. W: cmpl $4 movl %edi , %edi jmp .L4(,%rdi,8) %edi .L3: movl $17, %eax ret .15: movl $3, %eax int A ( int x , int y) { int a ; if ( x == 0 ) else i f ( x == 1 ) a = 3 ; else i f ( x == 2 ) a = 2 0 ; else i f ( x == 3 ) a = 2 ; else i f ( x == 4 ) a = 1 ; ret .L6: a = 17; movl $20, %eax ret .L7: movl $2, %eax ret else a = 0; .L8: return a ; movl $1, %eax .L2: ret . section .rodata . L4: .quad .L3 .quad .L5 .quad .L6 .quad .L7 .quad .L8 X: testl %edi, %edi je cmpl je cmpl je стр1 je cmpl .L16 $1, %edi .L17 $2, %edi .L18 $3, %edi int B (int x, int y) { int a; switch (x) { .L19 $4, %edi %al movzbl %al, %eax case 0: a = 17; break; sete break; case 1: a = 3; case 2: a = 20; break; case 3: a = 2; break; case 4: a = 1; a = 0; } return a; ret .L16: break; movl $17, %eax ret .L17: movl $3, %eax } ret .L18: movl $20, %eax ret .L19: movl ret $2, %eax10. a. Point Out errors: #include void main() { char arr[8]="Rhombus"; int i; for(i=0;i #include void main() { char *str1="United"; char *str2="Front"; char *str3; str3=strcat(str1,str2); printf("\n %s",str3); [- [- c. Compare Union and Structure.int y=0,i; for (int i=0;i<10;++i) y+=i; 36 66 45 55SEE MORE QUESTIONSRecommended textbooks for youProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage