Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Consider the
#include <iostream>
using namespace std;
void xqq(int x[], int h)
{
cout << " " << x[h-1];
xqq(x, h-1);
}
int main()
{
int Aq[] = {1, 2, 3, 4, 5};
xqq(Aq, 5);
return 0;
}
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- using c++ complete the code where it says , /* Your code goes here */ compute z= y- √2 #include <iostream>#include <cmath>#include <ios>#include <iomanip>using namespace std; int main() {double x;double y;double z; cin >> x;cin >> y; /* Your code goes here */ cout << fixed << setprecision(2); // This will output only 2 decimal places.cout << z << endl; return 0;}arrow_forward#include<bits/stdc++.h>using namespace std;bool isPalindrome(string &s){ int start=0; int end=s.length()-1; while(start<=end) { if(s[start]!=s[end]) { return false; } start++; end--; } return true;}int main(){ string s; cout<<"ENTER STRING:"; getline(cin,s); int n=s.length(); bool flag=true; for(int i=1;i<n;i++) { string lowerHalf=s.substr(0,i); string upperHalf=s.substr(i,n-i); if(isPalindrome(lowerHalf) && isPalindrome(upperHalf)) { flag=false; cout<<"String A is:"<<lowerHalf<<"\n"; cout<<"String B is:"<<upperHalf<<"\n"; break; } } if(flag) { cout<<"NO\n"; } return 0;} change to stdio.h string.harrow_forwardCreate a flowchart for this program in c++, #include <iostream>#include <vector> // for vectors#include <algorithm>#include <cmath> // math for function like pow ,sin, log#include <numeric>using std::vector;using namespace std;int main(){ vector <float> x, y;//vector x for x and y for y float x_tmp = -2.5; // initial value of x float my_function(float x); while (x_tmp <= 2.5) // the last value of x { x.push_back(x_tmp); y.push_back(my_function(x_tmp)); // calculate function's value for given x x_tmp += 1;// add step } cout << "my name's khaled , my variant is 21 ," << " my function is y = 0.05 * x^3 + 6sin(3x) + 4 " << endl; cout << "x\t"; for (auto x_tmp1 : x) cout << '\t' << x_tmp1;//printing x values with tops cout << endl; cout << "y\t"; for (auto y_tmp1 : y) cout << '\t' << y_tmp1;//printing y values with tops…arrow_forward
- Please Help In JAVA Here is the skeleton of a code for insertion sorting in an imperative language. You have to add right lines of codes for the language you choose (C, C++, C#, JAVA etc,). The following sample is for C++. #include <iostream>#include <array>#include <stdio.h>#include <stdlib.h>#include <ctime>using namespace std; void insertionSort(int A[], int n){for (int i = n-2; i >= 0; i--){ int j; int v = A[i]; for (j = i + 1; j <= n-1; j++) { if (A[j] > v) break; else A[j-1] = A[j]; } A[j-1] = v;}} int *randomArray(int n){srand((unsigned) time(0));int * A = new int [n];for (int i = 0; i < n; i++){ A[i] = rand();}return A;} Sample function calls (call these functions in main driver function):int n = 100000;int * A = randomArray(n);insertionSort(A, n);delete [] A; Note: delete memory of first array before sorting second array. After you modify the code: (1) Generate 100, 000 random numbers and sort them (2) Generate 300000…arrow_forwardWhen should you use generalising, overfitting, or underfitting, and what is the difference between the three?arrow_forwardIn C programming. How do I find the max and min values of the corressponding columns. #include <stdio.h>#include <math.h>#include <stdlib.h>#define NROWS 5#define NCOLS 5 int main(void){ int i,j, max, min, m, n; float M[NROWS][NCOLS], Mt[NROWS][NCOLS]; char key_hit; //Input the sizes printf("ROW size(1-5) : ");scanf("%d",&m); printf("Column size(1-5): ");scanf("%d",&n); //Size Check while(m>NROWS || n>NCOLS) { printf("Please re-enter the sizes. \n"); printf("Row size(1-5) : ");scanf("%d", &m); printf("Column size(1-5) : ");scanf("%d", &n); } //Input the Matrix Data for(i=0; i<m; i++) for(j=0; j<n; j++) { printf("M[%d][%d] = ", i,j); scanf("%f", &M[i][j]); } //Print the Matrix Data for(i=0; i<m; i++) { for(j=0; j<n; j++) { printf("%1.2f\t", M[i][j]); }…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education