Answer:
DNA obj =new DNA;//obj object created dynamically.
DNA *dnaPtr=&obj.//dnaPtr to store the address of the object.
Explanation:
The above written statements are in C++.The DNA object is created dynamically and it is done in C++ by using new keyword which allocates the heap memory for the object.
Then a dnaPtr is created of type DNA so that it can store the address of the DNA objects.
Answer:
Following are the program in C++ language
#include<iostream> // header file
using namespace std; // namespace std
int reverse(int n1); // function prototype
int main() // main function()
{
int num; // Variable declaration
cout << "Enter the number" << endl;
cin >> num; // Read the number bu the user
cout<<"After Reverse the digit:\n";
int res= reverse(num); // calling function reverse
cout<<res; // display
}
int reverse(int n1) // function definition of reverse
{
if (n1<10) // checking the base condition
{
return n1;
}
else
{
cout << n1 % 10; // Printed the last digit
return reverse(n1/10); // calling itsself
}
}
Output:
Enter the number:
76538
After Reverse the digit:
83567
Explanation:
Following are the description of the program
- In the main function read the number by user in the "num" variable of int type.
- Calling the reverse and pass that "num" variable into it.
- After calling the control moves to the body of the reverse function.In this function we check the two condition
1 base condition
if (n1<10) // checking the base condition
{
return n1;
}
2 General condition
else
{
cout << n1 % 10; // Printed the last digit
return reverse(n1/10); // calling itsself
}
- Finally return the reverse number and display them into the main function.
A sixteen bit microprocessor chip used in early IBM PCs. The Intel 8088 was a version with an eight-bit externaldata bus.
The Intel 8086 was based on the design of the Intel 8080 <span>and </span>Intel 8085 (it was source compatible with the 8080)with a similar register set, but was expanded to 16 bits. The Bus Interface Unit fed the instruction stream to theExecution Unit through a 6 byte prefetch queue, so fetch and execution were concurrent - a primitive form ofpipelining (8086 instructions varied from 1 to 4 bytes).
It featured four 16-bit general registers, which could also be accessed as eight 8-bit registers, and four 16-bit indexregisters (including the stack pointer). The data registers were often used implicitly by instructions, complicatingregister allocation for temporary values. It featured 64K 8-bit I/O (or 32K 16 bit) ports and fixed vectored interrupts.There were also four segment registers that could be set from index registers.
The segment registers allowed the CPU to access 1 meg of memory in an odd way. Rather than just supplyingmissing bytes, as most segmented processors, the 8086 actually shifted the segment registers left 4 bits and addedit to the address. As a result, segments overlapped, and it was possible to have two pointers with the same valuepoint to two different memory locations, or two pointers with different values pointing to the same location. Mostpeople consider this a brain damaged design.
Although this was largely acceptable for assembly language, where control of the segments was complete (it couldeven be useful then), in higher level languages it caused constant confusion (e.g. near/far pointers). Even worse, thismade expanding the address space to more than 1 meg difficult. A later version, the Intel 80386, expanded thedesign to 32 bits, and "fixed" the segmentation, but required extra modes (suppressing the new features) forcompatibility, and retains the awkward architecture. In fact, with the right assembler, code written for the 8008 canstill be run on the most <span>recent </span>Intel 486.
The Intel 80386 added new op codes in a kludgy fashion similar to the Zilog Z80 and Zilog Z280. The Intel 486added full pipelines, and clock doubling (like <span>the </span>Zilog Z280).
So why did IBM chose the 8086 series when most of the alternatives were so much better? Apparently IBM's own engineers wanted to use the Motorola 68000, and it was used later in the forgotten IBM Instruments 9000 Laboratory Computer, but IBM already had rights to manufacture the 8086, in exchange for giving Intel the rights to its bubble memory<span> designs.</span> Apparently IBM was using 8086s in the IBM Displaywriter word processor.
Other factors were the 8-bit Intel 8088 version, which could use existing Intel 8085-type components, and allowed the computer to be based on a modified 8085 design. 68000 components were not widely available, though it could useMotorola 6800 components to an <span>extent.
</span>
Hope this helps