In C++ syntax, define a class named employee. It should contain the name of the employee (a string of 25 characters) and employee identification (integer).
void set name (char name);
void set idnum (int ID);
In which situation serial search is better than binary search? Give an example situation.
Serial search is better than binary search when input data is not sorted.
At present what is the physical medium used in a wired Ethernet LAN?
Ethernet operates 10 Mbps or 100Mbps (and now even at 1 Gbps). It uses either twisted-pair copper wire are coaxial cable to connect a number of end systems with each other and with an edge router.
Show the symbol and boolean expression for logic gate EX-NOR.
What is an ADT? Is a C++ class an ADT?
Abstract Data type (ADT) is a type (or class) for objects whose behaviour is defined by a set of values and a set of operations. Data abstraction refers to, providing only essential information to the outside world and hiding their background details, i.e., to represent the needed information in the program without presenting the details. Let's take one real-life example of a TV, which you can turn on and off, change the channel, adjust the volume, and add external components such as speakers, VCRs, and DVD players, BUT you do not know its internal details, that is, you do not know how it receives signals over the air or through a cable, how it translates them, and finally displays them on the screen. C++ classes provide a great level of data abstraction. They provide sufficient public methods to the outside world to play with the functionality of the object and to manipulate object data.
Give two examples of computer languages that are interpreted instead of compiled.
TCP and IP operate at which layers of ISO/OSI protocol suite?
- TCP: Transport layer
- IP: Network layer
How is a syntax error different from a semantic error? Explain with an example.
- Syntax errors. These are invalid codes the compiler doesn't understand, e.g. your example of multiplying a string with an integer in C. The compiler will detect them because it can't compile them.
- Semantic errors. These are valid codes the compiler understands, but they do not what you, the programmer, intended. These may be using the wrong variable, the wrong operation, or operations in the wrong order. There is no way for the compiler to detect them.
Draw a logic circuit using NAND gates which can store 1 bit of information.
The study material for AMIE/B Tech/Junior Engineer exams is available at https://amiestudycircle.com