Project Manager Questions


Q:

What are intents, shared preference in android ?

Answer

An Android Intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity, broadcastIntent to send it to any interested BroadcastReceiver components, and startService(Intent) or bindService(Intent, ServiceConnection, int) to communicate with a background Service.The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed.
Android provides many ways of storing data of an application. One of this way is called Shared Preferences. Shared Preferences allow you to save and retrieve data in the form of key,value pair.


In order to use shared preferences, you have to call a method getSharedPreferences() that returns a SharedPreference instance pointing to the file that contains the values of preferences.

Report Error

View answer Workspace Report Error Discuss

3 2071
Q:

Statement: A large number of students who have passed their XII Std. terminal examination in the country could not get admission to colleges as the number of seats available are grossly inadequate.
Courses of action:
a. The evaluation system of XII Std. terminal examination should be made more tough so that fewer students pass the examination.
b. The Government should encourage the private sector to open new colleges by providing them land at cheaper rate.
c. The rich people should be asked to send their wards to foreign countries for higher studies enabling the needy students to get admission in colleges within the country.

A) only a and b follows B) Only c follows
C) Only b follows D) All a, b & c follows
 
Answer & Explanation Answer: C) Only b follows

Explanation:

Clearly, reducing the number of aspirants for admission to colleges or sending the students of well-to-do families to foreign countries for higher studies, is no proper solution. So, both I and III do not follow. The right solution is to increase the number of colleges so as t accommodate the increasing number of admission-seekers. So, only II follows.

Report Error

View Answer Report Error Discuss

4 2063
Q:

Which sentence is written correctly?

A) They never watch no movie during the working days, but in holidays they watch one movie. B) They never watch none movie during the working days, but in holidays they watch one movie.
C) They don't never watch any movie during the working days, but in holidays they watch one movie. D) They watch no movie during the working days, but in holidays they watch one movie.
 
Answer & Explanation Answer: D) They watch no movie during the working days, but in holidays they watch one movie.

Explanation:

They watch no movie during the working days, but in holidays they watch one movie.

is correctly written among the given options.

Report Error

View Answer Report Error Discuss

12 2062
Q:

What is String Args in Java?

Answer

String Args (String []) is an array of parameters of type String.


In Java, 'args' contains the supplied command-line arguments as an array of String objects. In other words, if you run your program as 'java MyProgram Hello World' then 'args' will contain ["Hello", "World"]. When a java class is executed from the console, the main method is what is called.

Report Error

View answer Workspace Report Error Discuss

9 2058
Q:

Define Executive Plan in Database SQL ?

Answer

Executive plan can be defined as:


* SQL Server caches collected procedure or the plan of query execution and used thereafter by subsequent calls.


* An important feature in relation to performance enhancement.


* Data execution plan can be viewed textually or graphically.

Report Error

View answer Workspace Report Error Discuss

6 2054
Q:

Statement: The air and rail services have been severely disrupted due to thick fog in the northern part of the country.
Courses of action:
a. The rail and air services should be temporarily suspended in the region.
b. People should be advised to make their travel plan keeping in mind the probable disruption resulting in delay or cancellation of services.
c. The government should immediately install modern machines which will enable itto guide the rail and air services even if the thick fog develops.

A) Only a follows B) a and b follows
C) Only b follows D) a, b & c follows
 
Answer & Explanation Answer: D) a, b & c follows

Explanation:

Keeping in mind the safety and convenience of passengers, both 'a' and 'b' follow. 'c' clearly suggests a remedy to the problem and hence it also follows.

Report Error

View Answer Report Error Discuss

1 2030
Q:

Undefined reference to 'pthread_create'

How to Fix this error?

Answer

This is a common error while compiling C program in Linux. This error occurs when you are using pthread_create function to create threads in your programs.


To fix this problem ensure following points:
Include header file pthread.h in your program.
Add –lpthread linker flag with compilation command.
1- Include Header file
#include <stdio.h>
#include <pthread.h>
...
...
2- Compile command
gcc main.c -o main -lpthread

Report Error

View answer Workspace Report Error Discuss

0 2014
Q:

Which is a reserved word in the java programming language?

A) Variable B) Identifier
C) Keyword D) Main
 
Answer & Explanation Answer: C) Keyword

Explanation:

Reserved words are words that cannot be used as object or variable names in a Java program because they're already used by the syntax of the Java programming language.

Java reserved words are keywords that are reserved by Java functions or other uses that cannot be used as identifiers (e.g., variable names, function names, class names).

If a reserved word was used as a variable you would get an error or unexpected result.

 

Examples : Int, Long, Abstract, Class, Break, Catch, Case, Public, Static, Void,...

 

 

Report Error

View Answer Report Error Discuss

1 2005