Top 45 Pro*c/c++ Interview Questions
Q1. What Is Cross Join?
Cross join is described as the Cartesian product of records from the tables present inside the be part of. Cross be part of will produce result which mixes each row from the primary desk with the every row from the second one table.
Q2. What Is Class Invariant?
A elegance invariant is a situation that defines all valid states for an item. It is a logical circumstance to make sure the correct running of a class. Class invariants have to maintain while an object is created, and that they should be preserved below all operations of the class. In precise all magnificence invariants are each preconditions and submit-conditions for all operations or member features of the elegance.
Q3. What Is The Difference Between A Copy Constructor And An Overloaded Assignment Operator?
A replica constructor constructs a new item through the usage of the content of the argument item. An overloaded undertaking operator assigns the contents of an present item to another current item of the identical magnificence.
Q4. What Are Privileges And Grants?
Privileges are the rights to execute SQL statements – approach Right to attach and join. Grants are given to the object in order that objects may be accessed consequently. Grants may be provided by the proprietor or writer of an item.
Q5. What Are The Attributes Of Cursor?
Attributes of Cursor are :
%FOUND :
Returns NULL if cursor is open and fetch has now not been done.
Returns TRUE if the fetch of cursor is achieved successfully.
Returns False if no rows are returned.
%NOT FOUND :
Returns NULL if cursor is open and fetch has not been carried out
Returns False if fetch has been executed
Returns True if no row was returned
%ISOPEN :
Returns genuine if the cursor is open
Returns false if the cursor is closed
%ROWCOUNT :
Returns the range of rows fetched. It needs to be iterated thru entire cursor to offer precise real remember.
Q6. What Is Hash Cluster?
Hash Cluster is a technique used to keep the desk for faster retrieval. Apply hash value at the desk to retrieve the rows from the desk.
Q7. What Is Coalesce Function?
COALESCE function is used to go back the price which is about to be no longer null in the listing. If all values in the listing are null, then the coalesce characteristic will go back NULL.
Coalesce(value1, value2,value3,…)
Q8. What Is An Alert?
An alert is a window which seems inside the center of the display screen masking a portion of the present day display.
Q9. How Can We Delete Duplicate Rows In A Table?
Duplicate rows within the desk may be deleted by means of the use of ROWID.
Q10. What Is Raw Datatype?
RAW datatype is used to keep values in binary facts layout. The maximum length for a uncooked in a desk in 32767 bytes.
Q11. What Is With Check Option?
The WITH CHECK option clause specifies check stage to be carried out in DML statements. It is used to prevent adjustments to a view that could produce outcomes that aren't included inside the sub query.
Q12. What Is Blob Datatype?
A BLOB information kind is a varying period binary string that's used to keep gigabytes memory. Length should be laid out in Bytes for BLOB.
Q13. What Is A Cursor Variable?
A cursor variable is associated with exceptional statements that may keep different values at run time. A cursor variable is a kind of reference kind.
Q14. What Is The Difference Between Rename And Alias?
Rename is a permanent name given to a table or a column whereas Alias is a transient name given to a desk or column. Rename is nothing however replacement of name and Alias is an exchange name of the table or column.
Q15. Define Inline Function?
Before the function definition, with the keyword inline, a characteristic is prefixed it is stated to be an inline function.
Q16. What Is An Integrity Constraint?
An integrity constraint is a statement defined a business rule for a desk column. Integrity constraints are used to make certain accuracy and consistency of records in a database. There are sorts – Domain Integrity, Referential Integrity and Domain Integrity.
Q17. What Is The Parameter Mode That Can Be Passed To A Procedure?
IN, OUT and INOUT are the modes of parameters that may be exceeded to a system.
Q18. What Do You Mean By Inline Function?
An inline function is a function that is extended inline when invoked.Ie. The compiler replaces the characteristic name with the corresponding function code. An inline characteristic is a feature this is increased in line whilst it's miles invoked. That is the compiler replaces the characteristic call with the corresponding characteristic code (just like macro).
Q19. What Are Cursor Attributes?
Each cursor in Oracle has set of attributes which enables an software application to test the country of the cursor. The attributes can be used to test whether cursor is opened or closed, found or now not discovered and also discover row depend.
Q20. How To Display Row Numbers With The Records?
A privilege is not anything but proper to execute an SQL question or to get admission to some other user item. Privilege can be given as system privilege or user privilege.
[sql]GRANT user1 TO user2 WITH MANAGER OPTION;[/sql]
Q21. Difference Between Varchar And Varchar2 Data Types?
Varchar can save upto 2000 bytes and varchar2 can keep upto 4000 bytes. Varchar will occupy area for NULL values and Varchar2 will not occupy any space. Both are differed with respect to area.
Q22. What Do You Mean By Group By Clause?
A GROUP BY clause may be used in pick out statement wherein it's going to accumulate records throughout more than one records and organization the outcomes by using one or greater columns.
Q23. What Is An Explicit Constructor?
A conversion constructor declared with the express key-word. The compiler does now not use an specific constructor to put into effect an implied conversion of sorts. It’s motive is reserved explicitly for creation. Explicit constructors are really constructors that can not participate in an implicit conversion.
Q24. What Do You Mean By Implicit Conversion?
Whenever information kinds are mixed in an expression then C++ plays the conversion routinely.
Here smaller kind is transformed to wider kind.
Example : in case of integer and glide integer is transformed into glide type.
Q25. What Is The Fastest Query Method To Fetch Data From The Table?
Row may be fetched from desk by using the use of ROWID. Using ROW ID is the quickest question method to fetch records from the desk.
Q26. What Is A View?
View is a logical table which based totally on one or more tables or perspectives. The tables upon which the view is based are called Base Tables and it doesn’t include information.
Q27. What Is An Iterator?
Iterators are like tips. They are used to get admission to the factors of bins consequently presenting a hyperlink between algorithms and containers. Iterators are described for particular containers and used as arguments to algorithms.
Q28. What Is The Maximum Number Of Triggers That Can Be Applied To A Single Table?
12 is the maximum variety of triggers that may be applied to a unmarried table.
Q29. What Is Key Preserved Table?
A desk is about to be key preserved desk if every key of the table also can be the important thing of the result of the be part of. It ensures to return simplest one copy of every row from the bottom desk.
Q30. What Is The Data Type Of Dual Table?
The DUAL table is a one-column desk found in oracle database. The desk has a unmarried VARCHAR2(1) column called DUMMY which has a cost of ‘X’.
Q31. Define Scope Resolution Operator?
If the feature is defined outside the elegance, this one is used to accomplice characteristic definition to the magnificence. It is likewise used to solve the scope of worldwide variables.
Q32. What Is A Sub Query And What Are The Different Types Of Sub Queries?
Sub Query is likewise called as Nested Query or Inner Query that's used to get data from more than one tables. A sub query is delivered inside the in which clause of the primary question.
There are unique sorts of subqueries:
Correlated sub query : A Correlated sub query can't be as unbiased query however can reference column in a desk listed inside the from list of the outer query.
Non-Correlated subquery : This can be evaluated as though it have been an unbiased question. Results of the sub question are submitted to the primary question or parent query.
Q33. What Is Difference Between Substr And Instr?
SUBSTR returns unique portion of a string and INSTR affords character position in which a pattern is discovered in a string.
SUBSTR returns string whereas INSTR returns numeric.
Q34. What Is Varray?
VArray is an oracle data type used to have columns containing multivalued attributes and it is able to keep bounded array of values.
Q35. What Is The Use Of Nvl Function?
The NVL feature is used to replace NULL values with every other or given value.
Example is – NVL(Value, replace cost)
Q36. Can We Store Pictures In The Database And If So, How It Can Be Done?
Yes, we are able to save snap shots within the database through Long Raw Data type. This datatype is used to save binary records for two gigabytes of duration. But the desk will have only on Long Raw records type.
Q37. What Is Using Clause And Give Example?
The USING clause is used to specify with the column to test for equality while tables are joined.
[sql]Select * from employee join earnings the use of employee ID[/sql]
Employee tables be part of with the Salary tables with the Employee ID.
Q38. How Do We Display Rows From The Table Without Duplicates?
Duplicate rows may be removed via the usage of the keyword DISTINCT in the pick out assertion.
Q39. What Is The Difference Between Translate And Replace?
Translate is used for man or woman by man or woman substitution and Replace is used substitute a single man or woman with a phrase.
Q40. What Are Set Operators?
SET operators are used with or greater queries and people operators are Union, Union All, Intersect and Minus.
Q41. What Are The Differences Between New And Malloc?
New initializes the allocated memory by means of calling the constructor. Memory allotted with new ought to be released with delete.
Malloc allocates uninitialized memory.
The allotted memory must be released with loose. New mechanically calls the constructor whilst malloc (doesn’t).
Q42. What Is The Usage Of Merge Statement?
Merge assertion is used to pick rows from one or greater facts source for updating and insertion into a table or a view. It is used to combine multiple operations.
Q43. What Is Friend Function?
The feature declaration ought to be preceded with the aid of the key-word buddy. The function definitions does no longer use both the keyword or the scope operator ::. The capabilities that are declared with the keyword buddy as friend feature. Thus, a friend feature is an normal function or a member of every other magnificence.
Q44. How Do We Get Field Details Of A Table?
Describe <Table_Name> is used to get the sphere details of a distinct desk.
Q45. What Are Nested Tables?
Nested desk is a facts kind in Oracle which is used to assist columns containing multi valued attributes. It also keep complete sub table.

