1.
1. create table { empno numeric (4) constraint emp_prim primary keyEmpname varchar2 (20) constraint emp_const check(empname = upper(empname))}
Correct Answer(s)
A. Emp_prim does not duplicate values.
B. Emp_prim does not contain null values
D. Emp_const check rmpname is in upper case.
Explanation
The given answer is correct because the constraint "emp_prim" is defined as a primary key, which ensures that it does not contain duplicate values. Additionally, primary keys do not allow null values, so "emp_prim" does not contain null values. The constraint "emp_const" checks that the "empname" column is in upper case, ensuring that it meets the specified condition.
2.
2.what are the functions performed by dynamic memory management?
Correct Answer(s)
A. Memory deallocation
B. Garbage collection
C. Variable block allocation
Explanation
Dynamic memory management refers to the allocation and deallocation of memory during program execution. Memory deallocation involves releasing memory that is no longer needed by a program, allowing it to be reused. Garbage collection is a process that automatically identifies and frees memory that is no longer in use, preventing memory leaks. Variable block allocation is a technique where memory is allocated in variable-sized blocks to accommodate different data types and sizes. Therefore, the functions performed by dynamic memory management include memory deallocation, garbage collection, and variable block allocation.
3.
3.what are the characteristics of object in oops methodology?
Correct Answer(s)
A. Identity
B. State
C. Behaviour
Explanation
The characteristics of an object in object-oriented programming (OOP) methodology include identity, state, and behavior. Identity refers to the unique identifier assigned to each object, allowing it to be distinguished from other objects. State refers to the data or variables associated with an object, which define its current condition. Behavior refers to the actions or methods that an object can perform, which determine its functionality and interactions with other objects. In OOP, objects are the fundamental building blocks, and these characteristics help define their properties and capabilities.
4.
A manager needs different jobtitles in the tableSelect distinct jobtitles From employees Choose the ans which are not true
Correct Answer(s)
A. Distinct is oprional
B. Distinct doess not have unique value
Explanation
The correct answer is "distinct is optional, distinct does not have unique value". This answer is correct because the "distinct" keyword in the SQL query is used to remove duplicate values from the result set. However, it is optional and not necessary to include it in the query. Additionally, the statement that "distinct does not have unique value" is true because the distinct keyword does not guarantee unique values, it only removes duplicates from the result set.
5.
Void main(){double x; float y;x+y;}if c=x+y then output of c can be in the form of?
Correct Answer(s)
A. Int
C. Long int
Explanation
The output of the expression "x+y" will be in the form of an integer or a long integer. This is because when adding a double and a float, the result will be automatically converted to the data type with higher precision, which in this case is either an integer or a long integer.
6.
Which of the following are qualifiers of integer ADT?
Correct Answer(s)
B. Unsigned long int
C. Short int
D. Long int
Explanation
The qualifiers of the integer ADT include unsigned long int, short int, and long int. These qualifiers allow for different ranges and sizes of integers to be used in programming. "None" is not a qualifier of the integer ADT as it does not specify any particular type or range of integers.
7.
What do u mean by signatures in the function overloading?
Correct Answer(s)
A. Return type
B. Parameters of function
C. Datatypes of parameters
Explanation
In function overloading, signatures refer to the combination of the return type, parameters of the function, and the datatypes of those parameters. The signatures of different overloaded functions should be unique, meaning that they should differ in at least one of these aspects. By having different signatures, the compiler can differentiate between the overloaded functions and determine which one to call based on the arguments provided. Therefore, the correct answer includes the return type, parameters of the function, and datatypes of the parameters, as these are all part of the function's signature.
8.
Firewall is in which layer?
Correct Answer(s)
A. Transport layer
B. Network layer
Explanation
The correct answer is transport layer. A firewall is a network security device that monitors and filters incoming and outgoing network traffic based on predetermined security rules. It operates at the transport layer of the OSI model, which is responsible for reliable and transparent transfer of data between end systems. The transport layer ensures that data is properly segmented, sequenced, and error-checked before being sent across the network. By operating at this layer, firewalls can effectively control and secure network traffic by examining the transport layer protocols such as TCP and UDP. The network layer, on the other hand, is responsible for routing and forwarding data packets across different networks.
9.
What are the properties of 3nf?
Correct Answer(s)
A. No redundancy
B. Integration of datas
C. Saves disk space
Explanation
The properties of 3NF (Third Normal Form) include the absence of redundancy, integration of data, and the ability to save disk space. 3NF eliminates duplicate data by breaking down tables into smaller, more specific ones, reducing redundancy. It also allows for the integration of related data from multiple tables through the use of foreign keys. Additionally, by eliminating redundancy and optimizing the structure of the tables, 3NF can save disk space by reducing the amount of storage required.
10.
Which of the following functions are used to read,write unformatted data into a file?
Correct Answer(s)
A. Fread
B. Fwrite
E. Fopen
Explanation
The functions fread, fwrite, and fopen are used to read and write unformatted data into a file. The fread function is used to read a specified number of bytes from a file, while the fwrite function is used to write a specified number of bytes to a file. The fopen function is used to open a file and returns a file pointer that can be used for subsequent read or write operations. Therefore, these three functions are commonly used when dealing with unformatted data in file operations.
11.
Which of the followin are variable scopes in c++
Correct Answer(s)
B. Class
D. Global
E. Local
Explanation
The variable scopes in C++ include class, global, and local.
- Class scope refers to variables that are declared within a class and can be accessed by all member functions of that class.
- Global scope refers to variables that are declared outside of any function or class and can be accessed from anywhere in the program.
- Local scope refers to variables that are declared within a function or a block of code and can only be accessed within that specific function or block.
12.
Which type of contructors are possilble in c++
Correct Answer(s)
A. Copy constructor
B. Default
C. Parameterized
Explanation
The possible types of constructors in C++ are copy constructor, default constructor, and parameterized constructor. A copy constructor is used to create a new object by copying the values from an existing object. A default constructor is used to create an object without any arguments. A parameterized constructor is used to create an object by passing arguments to initialize its member variables. The option "structure" is not a valid type of constructor in C++.
13.
Which of the following statements are true about constructors?
Correct Answer(s)
B. It does not returns a value
E. Name must be equal to the class name or method name
Explanation
Constructors are special methods in a class that are used to initialize objects. They do not have a return type, so they do not return a value. Additionally, the name of the constructor must be the same as the name of the class or method it belongs to. Therefore, the correct statements about constructors are: "it does not returns a value" and "name must be equal to the class name or method name."
14.
Which of the following are true about graph?
Correct Answer(s)
A. It sovles travelling sales man problem
B. Collection of nodes n edges ,
C. Location represented by nodes n bridges are represented by edges
Explanation
The given answer is incorrect. None of the statements are true about a graph. A graph is a mathematical structure that consists of a set of vertices (nodes) and a set of edges (connections between nodes). It does not solve the traveling salesman problem, which is a specific optimization problem. Additionally, the statement about location and bridges represented by nodes and edges is also incorrect. A graph can represent various types of relationships, but it does not specifically represent locations or bridges.
15.
Which of these are about stack?
Correct Answer(s)
A. Lifo(last in first out)
B. Fifo(first in first out)
C. Push
Explanation
The given options "lifo (last in first out)" and "fifo (first in first out)" are both related to the concept of a stack. In a stack, the last element that is added is the first one to be removed (LIFO) or the first element that is added is the first one to be removed (FIFO). Therefore, these options are about stack behavior. The option "push" is also related to a stack operation where an element is added to the top of the stack, while "pull" is not specifically related to stack behavior.
16.
Which of these are related to dma?
Correct Answer(s)
A. Best fit
C. Worst fit
D. First fit
Explanation
The options "best fit", "worst fit", and "first fit" are related to DMA (Direct Memory Access). These terms refer to different memory allocation strategies used in DMA. Best fit refers to finding the smallest available block of memory that can accommodate the data being transferred. Worst fit refers to finding the largest available block of memory for the transfer. First fit refers to allocating the first available block of memory that is large enough for the transfer. These strategies help optimize memory utilization and efficiency in DMA operations.