Posts

Showing posts with the label AMIE - Computing & Informatics

Computing & Informatics - MCQ from AMIE Exams (Winter 2021)

Image
Answer the following in brief. Differentiate between actual parameters and formal parameters. The Parameters which are sent from main function to the subdivided function are called as Actual Parameters, and the parameters which are declared in the subdivided function end are called as Formal Parameters. What is pre-processor? A software program that processes the source file before sending it to actual compilation is called a preprocessor. Differentiate between call by value and call by reference. A Call by value method basically copies the data/value in any argument to a formal parameter within the particular function. Hence, any updates or changes made to the main function’s parameter do not affect the overall argument in any way. The Call by reference method actually copies the address of an argument within a function to the formal parameter. The changes to formal parameters are reflected onto the actual parameters. Explain compiler and cross-compiler. A compiler is a program tha...

Computing & Informatics - MCQs from AMIE exam (Summer 2021)

Image
Choose the correct answer for the following (10 x 2) 1. What is C++? (a) C++ is an object-oriented programming language (b) C++ is a procedural programming language (c) C++ supports both procedural and object-oriented programming language  (d) C++ is a functional programming language 2. Which of the following is the correct syntax of including user-defined header files in C++? (a) #include [userdefined] (b) #include "userdefined" (c) #include <userdefined.h> (d) #include <userdefined> 3. Which of the following approach is used by C++? (a) Left-right (b) Right-left (c) Bottom-up (d) Top-down 4. Which of the following is correct about this pointer in C++? (a) This pointer is passed as a hidden argument in all static variables of a class (b) This pointer is passed as a hidden argument in all the functions of a class (c) This pointer is passed as a hidden argument in all non-static functions of a class (d) This pointer is passed as a hidden argument in all static func...

Computing & Informatics - short answer questions from AMIE exams (Summer 2020)

Image
What is the range of numbers that can be assigned to a variable declared as an unsigned integer? A 1-byte unsigned integer has a range of 0 to 255. Compare this to the 1-byte signed integer range of -128 to 127. Both can store 256 different values, but signed integers use half of their range for negative numbers, whereas unsigned integers can store positive numbers that are twice as large. Determine the hierarchy of operations and evaluate the following expression: i = 2 * 3 / 4 + 4 / 4 + 8 - 2 + 5 / 8 Stepwise evaluation of this expression is shown below: i = 2 * 3 / 4 + 4 / 4 + 8 - 2 + 5 / 8 i = 6 / 4 + 4 / 4 + 8 - 2 + 5 / 8  operation: * i = 1 + 4 / 4 + 8 - 2 + 5 / 8      operation: / i = 1 + 1+ 8 - 2 + 5 / 8      operation: / i = 1 + 1 + 8 - 2 + 0      operation: / i = 2 + 8 - 2 + 0      operation: + i = 10 - 2 + 0      operation: + i = 8 + 0      operation : - i = 8      op...

Computing & Informatics - MCQ from AMIE exams (Winter 2019)

Image
1. The term ‘Pentium’ is related to (a) DVD (b) Hard Disk (c) Microprocessor (d)Mouse 2. What does HTTP stands for? (a) Head Tail Transfer Protocol (b) Hypertext Transfer Protocol (c) Hypertext Transfer Plotter (d) Hypertext Transfer Plot 3. What type of software creates a smaller file that is faster to transfer over the Internet ? (a) Compression (b) Fragmentation (c) Encapsulation (d) Unzipped 4. Which is NOT a key word of C language (a) if (b) else (c) while (d) in 5. Data type ‘char’ of C language has a size equal to (a) one byte (b) two byte (c) two bit (d) one bit 6. The word ‘associative’ is related with (a) main memory (b) cache memory (c) harddisk (d) microprocessor 7. LAN stands for (a) Large area network (b) Long area network (c) Local area network (d) Light area network 8. The property/properties of a database is/are : (a) It is an integrated collection of logically related records. (b) It consolidates separate files into a common pool of data records. (c...

Computing & Informatics - MCQ from AMIE exams (Summer 2019)

Image
1. Which one of the following octal numbers would be obtained on converting the binary number 1010111 to a base 8 number? (a) 531 (h) 721 (c) 67 (d) 127 2. What will be displayed when the following C code segment is executed? #include<stdio.h> int main() { int a[5] = {5, 1, 15, 20, 25}; int i, j, m; i = ++a[1]; j = a[1]++; m = a[i++]; printf("%d, %d, %d", i, j, m); return 0; } (a) 2, 1, 15 (b) 1, 2, 5 (c) 3, 2, 15 (d) 2, 3, 20 3. Which of the following protocol is used to retrieve emails? (a) SMTP (b) POP3 (c) FTP (d) SNMP 4. Which one of the following most correctly describes the functionality of the control unit in a CPU? (a) To perform arithmetic operations based on decoded program instructions (b) To store program instructions (c) To perform logic operations based on decoded program instructions (d) To generate control signals based on decoded program instructions 5. Which one among the following is the smallest integer that can be represented in 2’s complement form...

Computing & Informatics - short answer questions from AMIE exams

Image
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). class Employee {  private: char name int idnumber public: 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...

Computing & Informatics - short answer type questions from AMIE exams

Image
Explain method overloading in C using an example. C++ Overloading (Operator and Function) C++ allows you to specify more than one definition for a function name or an operator in the same scope, which is called function overloading and operator overloading respectively. How is a compiler different from a language translator? Compiler converts the program from one computer language to another computer language that is translating from a higher-level language to a lower-level language. A translator translates one language to many other languages or else we can say a translator is usually translating from a high-level language to another high-level language, or from a low-level language to a high-level language. Write two important advantages of using a DBMS as compared to using a file for storing data. Compared to the File Based Data Management System, Database Management System has many advantages. Some of these advantages are given below − Reducing Data Redundancy: The file-based data ...

Computing & Informatics - short answer questions from AMIE exams

Image
State Moore's law. Moore's law refers to an observation made by Intel co-founder Gordon Moore in 1965. He noticed that the number of transistors per square inch on integrated circuits had doubled every year since their invention. Moore's law predicts that this trend will continue into the foreseeable future. What is the full form of ENIAC? Electronic Numerical Integrator and Computer. The Electronic Numerical Integrator And Computer (ENIAC) was the very first general-purpose electronic computer. It was designed primarily to calculate artillery firing tables to be used by the United States Army's Ballistic Research Laboratory to help US troops during World War II. What is a Baud rate? The baud rate of a data communications system is the number of symbols per second transferred.  Baud rate is commonly used when discussing electronics that use serial communication. In the serial port context, "9600 baud" means that the serial port is capable of transferring a max...

Computing & Informatics - short answer questions from AMIE exams

Image
To realize 8 Mbyte of memory, how many chips of size 512 Kbytes are required? 2¹⁶ = 512 Hence 16 chips When an instruction is under execution, it should be in which register in the CPU? Instruction Register (IR) What would be the binary representation of the decimal value 0.25? To convert the fractional part to binary, multiply the fractional part with 2 and take the one bit which appears before the decimal point. Follow the same procedure after the decimal point (.) part until it becomes 1.0. 0.25 x 2 =0.50 //take 0 and move 0.50 to next step 0.50 x 2 =1.00 //take 1 and stop the process Hence 0.25 (decimal) = (01) (binary) What is the full form of TCP? The Transmission Control Protocol (TCP) is a transport protocol that is used on top of IP to ensure the reliable transmission of packets. TCP includes mechanisms to solve many of the problems that arise from packet-based messaging, such as lost packets, out of order packets, duplicate packets, and corrupted packets. What is the name of ...

Computing & Informatics - short answer type questions from AMIE exams

Image
What is the purpose of the exit () command? To quit a program What is a global variable? How long does a global variable remain alive? Global variables are those variables that are visible to all functions. Any function can read/modify them. Global variables remain till the program terminates. What do you mean by a pointer variable in C programming? Give an example. A pointer is a variable that stores the address of another variable. Unlike other variables that hold values of a certain type, a pointer holds the address of a variable. For example, an integer variable holds (or you can say stores) an integer value, however, an integer pointer holds the address of an integer variable.  Syntax : datatype *var_name;  int *ptr;   //ptr can point to an address which holds int data Explain how one can recall a previously used DOS command by pressing some key. Using F9 key What happens when the following command is used? chmod u = rwx,go=r-x foo The access mode of the file is...

Computing & Informatics - short answer questions from AMIE exams

Image
How many RAM chips of size 256 KB are required to realize a 1 GB memory? 1 GB/256 KB = 2³⁰/2¹⁸ = 212 chips List the basic difference between DOS and Unix. DOS is a single-user operating system. UNIX is the multiuser operating system. List two disadvantages of a database system as compared to a file-based system. A processor with a high speed of data processing and memory of large size is required to run the DBMS software.  When a computer file-based system is replaced with a database system, the data stored into a data file must be converted to database files. It is a difficult and time-consuming method to convert data of data files into the database. What information does a superblock of a file system contain? The simplest definition of Superblock is that it's the metadata of the file system. Similar to how i-nodes stores metadata of files, Superblocks store metadata of the file system. As it stores critical information about the file system, preventing corruption of superblocks i...

Computing & Informatics - short answer type questions from AMIE exams

Image
Evaluate the following C expression, and explain your answer: 5 + 2/3 *5 - 4/3  5 + 2/3*5 – 4/3 = 5 + 0*5 – 1 = 4 Name two application layer protocols. TELENET, SMTP What are the typical sizes of the main memory and hard disk of a modern desktop computer? Main memory = 4, 8 GB DRAM Hard disk = 500 GB , 1 TB Is a two-dimensional array passed as a value or reference argument to a function? Explain your answer by writing a function prototype illustrating this. The two-dimensional array passed as a reference argument to a function. Define a C structure named str that has integer i, an integer array of size 10 called arr, and a character c as its members. struct str { int i; int arr [10]; char c; } The size of the address bus and data bus of a CPU is 16 bits and 32 bits, respectively. What can be said about the size of its internal registers and address space? Size of internal registers = 32 bits Address space = 2¹⁶ = 64 K What is the full form of SMTP? For what applic...

Computing & Informatics - short answer type questions from AMIE exams

Image
What is the octal equivalent of the decimal number 1000? (1000) 10  = (1750) 8 Step by step solution Step 1: D ivide (1000) 10  successively by 8 until the quotient is 0: 1000/8 = 125, remainder is 0 125/8 = 15, remainder is 5 15/8 = 1, remainder is 7 1/8 = 0, remainder is 1 Step 2: Read from the bottom (MSB) to top (LSB) as 1750. What will be the output of the following logic circuit when A, B and C are 1, 0 and 0 respectively. The output will be 1. Name the input device that can help a computer to read printed documents. Scanner with an OCR software If more than one printer has been attached to a computer, how can you direct your output to a specific printer? Go to networked places and choose a specific printer. Then give print command from document to be printed. What is the range of numbers that can be assigned to a variable declared as an unsigned integer? 0 to 4294967295 What will be the output generated by the following code? ink k = 5; ink i = 0; if (k) i ++; cout <...

Computing & Informatics - true/false type questions from AMIE exams

Image
Yes/No type questions. A variable of type char can be used to store the integer 101. A variable defined within a function is visible to all functions onwards from its point of definition. The element referred to by array Example [5] is the sixth element of the array. The binary representation of the decimal number 45.25 is 101101.1101. The hard disk is also known as the main memory of a computer system. A minimum of four computers is required to establish a LAN. The secondary memory of a computer is also known as volatile memory. A management information system is an example of a system program. Application programs are easier to write compared to system programs. MS-DOS is an example of a virtual memory op crating system. Answers Yes. In a variable of type char up to 256 (unsigned) can be stored as 1-byte memory space is allocated for char type variable. No. A variable defined within a function is visible only within the function (local variable). If a variable is to be visible for al...

Computing & Informatics - True/false type questions from AMIE exams

Image
True/false type questions. Pentium is a 64-bit machine since it has got 64-bit Data Bus. Microsoft Windows 2000 is a single-user operating system. C++ is a completely portable language. An Assembler for Pentium is mandatory to support C++ execution in a Pentium based PC. TCP/IP can be run only when Ethernet is available as the data link protocol. Internet refers to a network of computers connected through optical fibres and other forms of wired cables. C++  compiler cannot handle scanf and printf commands are available in C. A modem, as well as an Ethernet card, are essential to provide Data One Broadband Connection. L1 cache is a split memory to speed up execution. The primary memory of every computer is essentially magnetic memory. Answers True. It has a 64-bit data bus and internal processing capability. True. Only one user can login and work with windows 2000 OS. Multiple windows can be opened and multiple programs can be executed on a time-sharing basis. True. C++ can be run o...

Computing & Informatics - short answer questions from AMIE exams

Image
How is an interpreter different from a compiler? A compiler searches all the errors of a program and lists them. If the program is error-free then it converts the code of the program into machine code and then the program can be executed by separate commands. An interpreter checks the errors of a program statement by statement. How is assembly language different from machine language? Machine language is the computer programming language that can be used for direct programming of the machine. All you needed is a machine and knowledge of the language but the problem with machine language is that it requires 100% accuracy which is extremely difficult. Due to the hard learning of machine language assembly languages are used. Assembly languages are used to create a program on a computer and then the assembler is used to convert the program into binary code of machine-level code. What is the distributive law of Boolean algebra? Use the law to prove that A + A'B = A + B. Distributive la...