Write a program (in Q0.c) to do the following:
In main(), declare an integer x. Print the address of x (using the address-of operator). Pass x as an argument to a function void fooA(int* iptr). (Hint: can you pass x itself directly?)
In fooA(int* iptr), print the value of the integer pointed to by iptr, the address pointed to by iptr, and the address of iptr itself.
In the main function, following the call to fooA(...) , print the value of x.
Implement function int fooB(int* a, int *b, int c) which should perform the following computations:
Assign a + b to c.
Set the value pointed to by a to the value pointed to by b.
Set the value pointed to by b to double its original value.
Return the value of c.
In: Computer Science
Some things that need to be added to it are: Make it as simple as possible
colors
background colors
fonts
borders
position everything horizontally
Heres the code I have so far:
<html>
<head>
<title> TheWebpage</title>
<meta charset="utf-8"
/>
</head>
<body>
<header>
<h1>Welcome to my first web
page.</h1>
</header>
<article>
<h1>Favorite dream
vacation</h1>
<img src="Japansmap.jpg" alt=""
/>
<p><strong>Japan</strong>
Japan is one of my dream places I
would like to take
my dream vacation. From the way
they take cleaning very seriously, to the cultural differences
between America and
Japan. Its a place I've dreamed of
going to for a long time. From the city to the country side, both
look stunning.
Especially Mt. Fuji, which is a
staple of Japan. Not only that, but the bullet trains let you get
around the country
very fast and at an affordable
price. Overall its a country that I'm very interested in and would
like to learn
more about as time goes
on.<p>
</article>
</body>
</html>
In: Computer Science
Describe (t,n) Shamir secret sharing scheme
In: Computer Science
In: Computer Science
Which of these statements are true and which are false?
(a) If f(n) = Θ(g(n)) and g(n) = Θ(h(n)), then h(n) = Θ(f(n))
(b) If f(n) = O(g(n)) and g(n) = O(h(n)), then h(n) = Ω(f(n))
(c) If f(n) = O(g(n)) and g(n) = O(f(n)) then f(n) = g(n)
(d) 100n = Ω(n2)
(e) In the merge-sort execution tree, roughly the same amount of work is done at each level of the tree.
(f) An algorithm is randomized if its behavior is determined in part by values produced by a random-number generator.
(g) Quicksort can be used as the auxiliary sorting routine in radix sort, because it operates in place.
In: Computer Science
Suppose you want to store line segments in an R-tree. If a line segment is not parallel to the axes, the bounding box for it can be large, containing a large empty area.
Describe the effect on performance of having large
bounding boxes on queries that ask for line segments intersecting a
given region.
Briefly describe a technique to improve performance
for such queries and give an example of its benefit. Hint: You can
divide segments into smaller pieces.
In: Computer Science
PYTHON
Write a program for an event organizer. The code can be as short as 7 lines; 9 lines are good enough!
a) Request the organizer to enter a participant’s full name in a single input. The input can take two different formats: i. l_name, f_name [1.5 pts] ii. f_name l_name [1.5 pts] b) Print a customized greeting message using the first name, regardless of the formats: “Dear f_name, welcome to the party!” with only the 1 st letter of f_name in upper case.
Hint 1: Try to work on one form, at a time. After figuring out how to do both, add an if statement.
Hint 2: Just need to use in, len(), .find() and, of course, input().
In: Computer Science
Write a program that read an array consists of 4 rows and 4 columns, then computes and print the sum of the elements above and below the main diagonal. (WITH C++)
In: Computer Science
car.txt
0001|Mercury|LeSabre|2005|Brown|11000|2019-09-01
0002|Chevrolet|Aveo|2013|Blue|12000|2019-09-02
0003|Datsun|240Z|1979|Orange|13000|2019-09-03
0004|Ford|Galaxie|1964|Black|14000|2019-09-04
0005|Porsche|Boxster|2014|Green|15000|2019-09-05
0006|Honda|Insight|2007|Silver|16000|2019-09-06
1) Design and implement a class of "car" with constructor and destructor, with member variable for each field, and method for get and set each field. (2) Read the file (car.txt) to instantiate each object for each record read from the file. (3) After the file input is done, then display each object to the console.
Car List
Record #1
(1) carID=0001
(2) carManufacturer=Mercury
(3) carModel=LeSabre
(4) carYear=2005
(5) carColor=Brown
(6) carPrice=11000
(7) carInventoryDate=2019-09-01
and so on.
Task#2. Output each object to a file (car1.txt) with the same format as shown in Task#1.
Car List
Record #1
(1) carID=0001
(2) carManufacturer=Mercury
(3) carModel=LeSabre
(4) carYear=2005
(5) carColor=Brown
(6) carPrice=11000
(7) carInventoryDate=2019-09-01
// sample c++ code for object to binary file IO.
// try c++ to compile this program
#include <iostream>
#include <fstream>
using namespace std;
class Student
{
public:
char name[10];
char address[10];
char Gender;
char DOB[10];
Student()
{}
};
int main()
{
cout<<"\n Writting on file: Student1.txt \n";
Student *p=new Student;
cout<<1<<": ";
cin>>p->name;
cout<<"\n";
// to append use ios::app
// ofstream osfile("Student1.txt",ios::binary|ios::app);
ofstream osfile("Student1.txt",ios::binary);
osfile.write((char*)p,sizeof(Student));
osfile.close();
cout<<"\n reading Student1.txt \n";
Student *p2=new Student;
ifstream isfile("Student1.txt",ios::binary);
isfile.read((char*)p2,sizeof(Student));
isfile.seekg(0);
isfile.close();
cout<<1<<": ";
cout<<p2->name;
cout<<"\n";
return 0;
}
In: Computer Science
Hello everyone, I need to Research a Cloud Computing Service Level Agreement to describe what it entails. Please point me to one that includes any of these components:
a break down of services provided and excjuled
costs for services
Duration of the agreement
Responsibilities of the customer and the service provider
In: Computer Science
Salary Raise: At the beginning of every year, you receive a raise on your previous year’s salary.
Raise = Salary * Rate
Create an application that displays the amount of your annual raises and also your new salaries for the next ten years, using raise rates of 1.5%, 2%, 2.5%, 3%, 3.5%, 4%, 4.5%, 5%.
The input for the salary should come from an input box and should only allow a value between 10,000 and 100,000. Use a loop to validate the input.
In: Computer Science
Question about bat algorithm
What are the main heuristics (or principles, or strategies) of the bat algorithm that make it works as the optimal heuristic search?
thanks
In: Computer Science
For this assignment, you will select a current research paper (published since 2016) to review. You may select any research paper that is related to Data Science or Big Data Analytics. I strongly recommend that you start your search at Google Scholar . Once you enter your search term(s), select the "Since 2016" link on the left. Feel free to choose ANY relevant paper. (I would recommend that you select one that you can read and summarize in a reasonable amount of time. Don't select a 100 page paper!)
Need 200 words review on that paper
Please Don't rewrite already existing chegg answers
In: Computer Science
In DBMS, what would you use to obtain information about the Current logic structure of database?
How this informations recorded in the DBMS and who is responsible to maintain?
In: Computer Science
Racket/Scheme language
[15p] create-mapping A map data structure is described as either a set of key-value pairs or a set of keys and a set of values whose relation is described by a function with a one-to-one mapping from keys to values. Write a function, create-mapping, which takes a list of symbols (keys) and a list of any type of Scheme values (vals) and returns a function that takes one symbol argument (the key) and returns the corresponding value. The mapping is determined by the position of the elements in the two lists.
For example: ;keys > (define roman-numerals-keys '(I II III IV V)) ;values > (define arabic-numerals-vals '(1 2 3 4 5)) ;
The pairs mapped will be: ;I -> 1 ;II -> 2 ;III -> 3 ;and so forth ;the (create-mapping) function returns a function that we bind for later use > (define roman-to-arabic (create-mapping roman-numerals-keys arabicnumerals-vals)) > (roman-to-arabic 'I) 1 > (roman-to-arabic 'V) 5 > (roman-to-arabic 'some-symbol) uncaught exception: "Could not find mapping for symbol 'some-symbol" ;hint: create the error message in a similar way you did for problem 14 of hw01.
In: Computer Science