* If A = [1 2 3; 4 5 6; 7 8 9;0 0 0], then size(A)= O 44 34 O 33 O 43 Other:
Q: What the following code does? int * foo = new int [5]; if (!foo) { ...}
A: To find what the given code does - int *foo = new int[5]; if(!foo) {........}
Q: = i; break; } } if(!found) { printf("* ERROR: Employee ID not found! *\n"); return; } for(int i =…
A: The code is an implementation of a basic Employee Management System in C programming language. The…
Q: #include void main() { int i; int number[11]={12,15,17,3,2,7,10,10,15,15,50}; for(i=0;i< 11; i++){…
A: Over here array is given which has 11 elements and we have to find a Maximum, Minimum, and average…
Q: Given the followving: int a[5] = {2, 4, 6, 8, 10}; int *p = &a[1]; %3D What is the value of p[1]?
A: Answer : - option B) 6 why ?? because this line int *p = &a[1]; will assign one pointer to…
Q: Questions: 1. Would you prefer to use parallel arrays for id, age and salary or do you prefer an…
A: 1. Would you prefer to use parallel arrays for id, age and salary or do you prefer an array of…
Q: The program segment has errors. Find as many as you can. // This code should average a set of…
A: Step 1:- Program:- #include <iostream>using namespace std;int main(){int numCount,…
Q: char[ ] letters=new char[5];int x = 0;while(x < 10){ar[x]='a';x++;}
A: char[ ] letters=new char[5];int x = 0;while(x < 10){ar[x]='a';x++;}
Q: Write a program to find the value in an integer array all of length N that occurs at least (N/2 + 1)…
A: #include<stdio.h> #define MAX_SIZE 5000 int main(void) { int N; //Declare an array…
Q: Assume that int a[ 2 ][ 2 ] = { { 1, 2 }, { 3, 4 } }; the value of a[ 1, 1 ] = ______;
A: #include<stdio.h> int main(){ int i=0,j=0; int arr[2][2]={{1,2},{3,4}};…
Q: int al] =(2, 6, 3, 8, 12, 10, 14); What is the sum of a[1] and a[5]? O a. 16 O b. 20 O c. 14 O d. 18
A: The solution is provided below.
Q: Complete the code: string cars[5] = {"Volvo", "BMW", "Ford", "Mazda", "Honda"}; for(int i = 0; i< _;…
A: string cars[5]={"Volvo","BMW","Ford","Mazda","Honda"}; for(int i=0;i<5;i++){…
Q: Why does little-endian vs. big-endian matter here in this code
A: *In case of multiple questions, only the first will be answered. For other questions, put separate…
Q: if L1={ab,b} L2={abb,bb} then L1L2= * O {ababb,abbb,abbab,bbab}
A: Introduction
Q: 1- If A=[1,2; 3,4], and B=A*2; then A*B=? O [14, 30; 28,44] O [14, 30,20,44] O [14, 20; 30,44] O…
A: Answer in step 2
Q: #include struct dna { int number; char text; char stringvalue[30]; }; int main() {…
A: NOTE: - As asked the comments are being added on each line of the program. Any modification other…
Q: explain the relation between them VERY BRIEFLY: => [span and live time], [scope and principle of…
A: - Span and live time are the two things which should be considered while initialising and using…
Q: In this lab, you use what you have learned about searching an array to find an exact match to…
A: #include <iostream>#include <string>using namespace std; int main() { string…
Q: int a[ 10] = {1,5,3,8,4,2,6,9,7}; int *p; p = &a[2]; p[0] = 10; p[1] = 15; What are the values of a?
A: Required:
Q: if v=[15,8,-6]; u=[3,-2,6]; then u.*v = 45-16-36 -45 16 -36 O45-16 36 None of the above if A=[3 1;4…
A: Here in this question we have given two questions.in first one we have to find dot of two vector.and…
Q: static int sum_calc(int arr[], int len) { int sum = 0, index = 0; while (index <= len) { sum = sum +…
A:
Q: if L1={ab,b} L2={abb,bb} then LIL2= {ababb,abbb,abbab,bbab} O {ab,b,abb,bb} {ababb,abbb,babb,bbb}…
A: Given L1={ab,b} L2={abb,bb}
Q: A=[1 2 3;4 5 6;7 8 9] A(:,3)
A: Please find the answer below :
Q: What are the output from the C++ codes segments below? 1- {int x=10; while(x>5); { cout<<x<<"\n";…
A: The loop statements such as while and for loops run the block of code multiples times until the…
Q: CFG: Example 1 • Draw the CFG for the following code: int f(int n){ } int m = n* n; if (n < 0) else…
A: CFG for the code has been written in step2
Q: int A[10] = { 3,2,1,0,4}; int *p = &A[3]; %3D
A: Required:
Q: main(){ int M-20; if(M=340) cout<<M:} 20 O 40 O 21 O
A: Answer: Nothing will be printed last option i guess because its missing the first 3 options are…
Q: In computer programming 25 – (2 * -(10 + 4)) = ?
A: The given equation: 25 - (2 * -(10+4)) The most precedence of (10+4): 25 - (2* -(10+4)) = 25 - (2…
Q: 6. {w \ w doesn't contain exactly two a's}.
A: DFA stands for Design a Finite Automata. A language L is accepted by a DFA < Q , , q0 , , A >…
Q: int X[10]={2,0,6,11,4,5,9,11,-2,-1); %3D From the code above, what is the value of X[8] ?
A: Code: #include <iostream>using namespace std; int main(){ //as index value starts from 0…
Q: #include #include #include int main() { int i, j; printf("Columns I JIn"); for (i = 1; i< 4; ++i)…
A: Given:
Q: // MichiganCities.cpp - This program prints a message for invalid cities in Michigan. // Input:…
A: You need to check with each and every element in the array of strings and if it equals the input…
Q: 1. Why does little-endian vs. big-endian matter here in this code 2. Describe how pointer casting…
A: Answer: I have given answer in the brief explanation.
Q: #include #include typedef struct Number_struct { int num; } Number; void Swap(Number*…
A: Code: Swap Function void Swap(Number* numPtr1, Number* numPtr2) { int temp = numPtr1->num;…
Q: /*Line 1:*/ doublevalues[6] = {10, 20, 30, 40, 50, 60}; /*Line 2:*/ double* yalptr= values; /*Line…
A: NOTE: - There is error on line 1 the way of declaring and initializing an array is wrong.…
Q: include
A: 1) Computers store data in memory in binary. One thing that is often overlooked is the formatting at…
Q: 2- Let a = [123; 2 3 4; 12 5], b = [213 ; 50-2; 2 3 -1] prod = a* b. What is the value of prod?
A: This question is answered using Matlab programming language.
Q: KLold T T=T+(K-2)*L T=T-10 T=0 T=T-10 K= 4, 8, 2 L=4, 3, -1 T=T+(K-2)*L
A: Given graph contains lines of codes and the variables present in this are T, K and L. The initial…
Q: The following code will display 150: { int a[] = { 10,20,30,40,50 }; int sum = 0; for (int i = 0; i…
A: Please find the answer below :
Q: eturns the best obtainable price for a rod of length n and price[] as prices of different pieces…
A: The function cut_rod takes a list price as input, where price[i] represents the price of a rod of…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- I need the answer quickly#include <stdio.h> struct Single { int num; }; void printSingle(int f) { int binaryNum[33]; int i = 0; while(f>0) { binaryNum[i] = f % 2; f = f/2; i++; } for (int j=i-1; j>= 0; j--) { printf("%d",binaryNum[j]); } } int main() { struct Single single; single.num = 33; printf("Number: %d\n",single.num); printSingle(single.num); return 0; }#include <stdio.h>#include <string.h> int findRepeat(char* s){int p , i , j; p = -1; for (i = 0 ; i < strlen(s) ; i++){for (j = i + 1; j < strlen(s); j++){if (s[i] == s[j]){p = i;break;}}if (p != -1)break;}return p;} int main(){char str[] = "Hello World";int pos = findRepeat(str);if (pos == -1)printf("Not found");elseprintf("%c", str[pos]);return 0;}can you please explain this code for me
- #include using namespace std; int find(int arr[], int value, int left, int right) { int midpt = (left+right)/2; if (left > right) return -1; if ( arr[midpt] return midpt; else if (arr[midpt] < value) == value) return else return find(arr,value, left,midpt-1); } void main(void) { int arr[] ={4,5,6,9,11}; cout<2. int count(1); while(count <5) { } --count; std::cout << count << endl; Maal5- int arr[4]= {2, 4, 5, 3); for (int i= 0; i<4; i++) cout<Recommended textbooks for youDatabase 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:PEARSONC 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 EducationDatabase 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:PEARSONC 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