programming languages Online Quiz - 70
Covers programming fundamentals including sorting algorithms, data structures, operators, and C/C++ language features, along with Java Hibernate ORM framework concepts including session management, caching, and configuration.
Questions
Batch fetching is useful incase of ?
- lazy="true"
- lazy="false"
- lazy="on"
- lazy="off"
what is the default value in hibernate ?
- lazy=false;
- lazy=true;
- lazy=yes;
- lazy=no;
HQL is used in ?
- session.createQuery();
- session.createCriteria();
- session.createSQLQuery();
- session.lod();
What does session.load() return if there is no matching database row ?
- NULL
- Empty Object
- Unrecoverable exception
- None of the above
Does hibernate require persistent classes to implement Serializable?
- Required
- Not Required
- None of the above
- None
What does CacheMode do ?
- controls how a particular SessionFactory interacts with the Data Base.
- controls how a particular SessionFactory interacts with the second-level cache.
- controls how a particular session interacts with the second-level cache.
- None
If instances are not in the session or second-level cache which will give better performance?
- Query.list()
- Query.iterate()
- Both are same
- None of the above
What does sess.delete() do?
- a) remove data from in memory
- b) remove from database.
- c) remove from sessionFactory
- d) None of the above.
How can a whole class be mapped as immutable?
- By using the mutable="false" attribute in the class mapping.
- By using the ismutable="false" attribute in the class mapping.
- By using the ismutable="no" attribute in the class mapping
- None
what does hibernate.hbm2ddl.auto create this means ?
- create tables automatically
- create session object automatically
- create Session Factory object automatically
- None
Employee emp = session.load(Employee .class);
- Yes
- No
- None
- None of the above
____ forces hibernate to bypass the setter method and access the instance variable directly while initializing a newly loaded object.
- By mapping the property with access="onlyfield" in Hibernate metadata
- By mapping the property with access="variable" in Hibernate metadata
- By mapping the property with access="field" in Hibernate metadata
- none of the above
Difference between Emp e = session.load(Emp.class) and Emp e = session.createCriteria(Emp.class) ?
- On session close session.load() Emp Object unavailable to access.
- On session close session.createCriteria() Emp unavailable to access.
- None
- a & b
Which of the following is true?
- 1
- 66
- .1
- -1
- All of the above
What does 7/9*9 equal (in C and C++)?
- 1
- 0.08642
- 0
- 7
Which of the following is evaluated first:
- &&
- ||
- !
- &&&
If you continuously increment a variable, it will become negative?
- True
- False
- Cannot continuously increment a variable
- It depends on the variable type
Which of the following data structures is on average the fastest for retrieving data:
- Binary Tree
- Hash Table
- Stack
- Queue
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); }
- 1
- 0
- Code cannot compile
- Run time error
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4
- Bubble Sort
- Quick Sort
- Merge Sort
- Radix Sort