0

programming languages Online Quiz - 339

Description: programming languages Online Quiz - 339
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

The following will compile with no errors float abc = 2;

  1. True

  2. False


Correct Option: A

1.) Difference between fork() & vfork()

  1. a) vforlk() allows more one child process to be created simaltaneously whereas for() allows only one

  2. b) vfork() retains same PID for child & parent known as virtual PID

  3. c) vfork() suspends the parent process until child process exits

  4. d) fork() & vfork() are same


Correct Option: C

1.) Difference between fork() & vfork()

  1. a) vforlk() allows more one child process to be created simaltaneously whereas for() allows only one

  2. b) vfork() retains same PID for child & parent known as virtual PID

  3. c) vfork() suspends the parent process until child process exits

  4. d) fork() & vfork() are same


Correct Option: C

2.) How can I get/set an environment variable from a program?

  1. a) getenv(), setenv()

  2. b) getenv(), putenv()

  3. c) readenv(), writeenv()

  4. d) You cannot environmement variables inside a program


Correct Option: B

3.) How can I sleep for less than a second?

  1. a) sleep(1/10)

  2. b) Not possible

  3. c) usleep()

  4. d) ssleep()


Correct Option: C

4.) How can a parent and child process communicate?

  1. a) Using open()

  2. b) Using popen()

  3. c) Using fork()

  4. d) Using exec()


Correct Option: B

1) Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?

  1. a) Yes

  2. b) No

  3. c) can't say

  4. d) None of the above


Correct Option: B

Which statement is correct ?

  1. a) session.contains() method to determine if an instance belongs to the session cache.

  2. b) session.contains() method to determine if an instance belongs to the data base .

  3. c) Both are correct

  4. d) none of the above


Correct Option: A

5.) How do I get rid of zombie processes?

  1. a) Use popen() & pclose()

  2. b) Use wait()

  3. c) Use ps()

  4. d) None


Correct Option: B

What does session.createQuery("Query").scroll() return ?

  1. a) ListResultSet

  2. b) ResultSet

  3. c) ScrollableResultSet

  4. d) ScrollableResult


Correct Option: D

How can the mapping files be configured in Hibernate?

  1. a) Mapping files can be added to Configuration in the application code

  2. b) They can be configured in hibernate.cfg.xml using the elements

  3. c) both a and b

  4. d) none of the above


Correct Option: C

SessionFactory represent which level of cache ?

  1. a) 2nd

  2. b) Ist

  3. c) 3rd

  4. d) 4th


Correct Option: A

SessionFactory represent which level of cache ?

  1. a) 2nd

  2. b) Ist

  3. c) 3rd

  4. d) 4th


Correct Option: A

hibernate.cache.use_query_cache setting true enable cache regions ?

  1. a) StandardQueryCache and UpdateTimestampsCache

  2. b) StandardQueryCache

  3. c) QueryCache

  4. d) QueryCache and TimestampsCache


Correct Option: A

hibernate.cache.use_query_cache setting true enable cache regions ?

  1. a) StandardQueryCache and UpdateTimestampsCache

  2. b) StandardQueryCache

  3. c) QueryCache

  4. d) QueryCache and TimestampsCache


Correct Option: A
  1. a) lazy="true"

  2. b) lazy="false"

  3. c) lazy="on"

  4. d) lazy="off"


Correct Option: A

batch fetching is useful incase of ?

  1. a) lazy="true"

  2. b) lazy="false"

  3. c) lazy="on"

  4. d) lazy="off"


Correct Option: A

what is the default value in hibernate ?

  1. a) lazy=false;

  2. b) lazy=true;

  3. c) lazy=yes;

  4. d) lazy=no;


Correct Option: B

HQL is used in ?

  1. a) session.createQuery();

  2. b) session.createCriteria();

  3. c) session.createSQLQuery();

  4. d) session.lod();


Correct Option: A

What does session.load() return if there is no matching database row ?

  1. a) NULL

  2. b) Empty Object

  3. c) unrecoverable exception

  4. d) None of the above


Correct Option: C
- Hide questions