News Ticker

Menu

Latest Post

UpWork Tests

Writing Tests

Accounting Tests

Computer Skills

Management Skills

Recent Posts

UpWork (oDesk) & Elance Visual Basic 6 Test Question & Answers

July 03, 2015 / No Comments
UpWork (oDesk) & Elance Visual Basic 6 Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Visual Basic 6. Lets Start test.


Ques : Which of the following cannot be included in the Open method of the recordset?
Ans  : Cursor Type

Ques : You are creating a client application that calls ActiveX DLLs. Which of the following properties of the Err object provides the name of a component that sends an error back to the client application?
Ans  : Number

Ques :  Which event should you use to store property values into the PropertyBag?
Ans  : Terminate

Ques : Which event should be used to resize an ActiveX control as the user modifies the size of the control implementation on a form?
Ans  :  Resize

Ques : The ______ function can be used to run any .com, .exe, .bat or .pif file from a Visual Basic program.
Ans  : Shell

Ques : Consider the following program code:

(i) Dim FileName as String
Open FileName For Input As #FreeFile

(ii) Dim FileName as String
FileNum = FreeFile
Open FileName For Input As #FileNum
Ans  : Both (i) and (ii) are correct

Ques : What data type is the HelpContextID?
Ans  : String

Ques : To store pictures in an array, Visual Basic provides the _____ control.
Ans  : PictureClip

Ques : What is the sequence of events when a form is unloaded?
Ans  : QueryUnload, Unload and Terminate

Ques : What is the default value for the scalemode property of the form?
Ans  : Twip

Ques : Visual Basic displays information depending upon the current value of two properties of the form, called:
Ans  : CurrentX and CurrentY

Ques : Which of the following statements is capable of abandoning a series of modifications made to a recordset locked with a BatchOptimistic lock?
Ans  :  CancelUpdate

Ques : What is the purpose of the Image List Control?
Ans  : To display images to the user

Ques : A __________ control defaults to displaying the files in the current directory:
Ans  : File List Box

Ques : Which property procedure is used to retrieve the value of a property?
Ans  : Retrieve

Ques : Which method will you use to remove a form from the Screen but retain it in memory?
Ans  : Show method

Ques : Which events allow you to determine if a Control or Shift key was pressed by the user?
Ans  : Click and KeyPress

Ques : In order to overlap the controls (say a command button) during design time, we use the 'Send To Back' or 'Bring To Front' option from the Edit menu. To change it dynamically (i.e. during program execution) we need to change:
Ans  : Background color property

Ques : The ____ function returns the numeric value from a string expression:
Ans  : Val

Ques : What do CurrentX and CurrentY return?
Ans  : Current X and Y co-ordinates of mousepointer

Ques :  Variables that allow sharing of values across event procedures are called:
Ans  : Form level variable

Ques : Which of the following approaches to data modifications is the least efficient?
Ans  :  Updating through a cursor using a recordse

Ques : The interval property of the Timer control specifies the time in:
Ans  : Milliseconds

Ques : Which parameter of the WriteProperty method can be omitted but should be included to increase the efficiency of the control?
Ans  : Name

Ques : A project group is a Project which:
Ans  : Consists of several Projects

Ques : What is the purpose of the Class Builder add-in in Visual Basic:
Ans  : To add classes to the current project

Ques : An ADO dynamic property is:
Ans  : A property that changes value at runtime

Ques :   In order to provide a transparent background to the Form, you must change the _________ property to _______.
Ans  : BackStyle, Opaque

Ques : What does the controls collection contain?
Ans  : A list of all controls on a form

Ques : Global Procedures and Global Variables are declared in:
Ans  : Form Modules

Ques : Given the following code segment, how many instances of the form are created and displayed ?

      dim frmvar1 as frmperson,frmvar2 as frmperson
      set frmvar1 = new frmperson
      set frmvar2 = frmvar1
      load frmvar1
      frmvar2.show
Ans  : None

Ques :  Only Controls with a ________ property such as Picturebox, Toolbox, Statusbar etc. can be placed on an MDI form:
Ans  : Showtips

Ques : Whenever the current record is about to change, Visual Basic generates the ______ event:
Ans  : Validate

Ques : Which of the following will provide the best aggregate performance for a query that is not executed repeatedly?
Ans  : Direct execution

Ques : The _______ property enables Visual Basic to draw complete images in memory before displaying them on the Screen.
Ans  : AutoRedraw = True

Ques : Which event of an ActiveX control data provider runs every time a bound control extracts data through the provider?
Ans  : GetDataMember

Ques : One can convert a Visual Basic Application into ActiveX Document using:
Ans  : Visual Database Manager

Ques :  Which function or method will you use to get a count of the maximum index limit of an array?
Ans  :  UBound function

Ques : Which property of the ProgressBar determines how much of the bar is filled?
Ans  : Min

Ques : In order to change the mouse pointer shape from glass to watch-glass, the property to be used is:
Ans  : MousePointer

Ques : The caption and the name properties of the command button:
Ans  : Are one and the same

Ques : In order to access a file in Non-textual format, you have to open file in:
Ans  : Ascii Format

Ques : What is the extension of the Visual Basic project file that stores the design of a user control.
Ans  : .ctx

Ques : After a Dynaset type recordset has been created and opened, further searching is possible using the:
Ans  : FindNext method

Ques : Which method of the Recordset object should you use to navigate multiple recordsets returned by a stored procedure?
Ans  : NewRecordset

Ques :  Which event procedure is called only if AutoRedraw property is set to false:
Ans  : Form_GotFocus

Ques : Which events enable you to determine which key was pressed by the user?
Ans  :  Click and KeyPress

Ques : The Kill command in Visual Basic is used for:
Ans  : Stopping the current process

Ques : Which method would you use to get a free or unused File identifier while opening any file:
Ans  : FreeFile

Ques : Which event is fired when a text box loses focus?
Ans  : LostFocus

Ques :  Message Boxes can hold a maximum of _______ characters.
Ans  : 256

Ques : Which of the following is the only valid Resume statement in an error handler?
Ans  : Resume prior

Ques : Which is the only event of the timer control?
Ans  : Timer

Ques : Consider the following subprogram:

        Sub ChangeText(ByVal X as String,Y as String)
          Y = X
        End Sub


If you are calling it using the following code:

            Call ChangeText(Form1.Caption,Y$)
Ans  : The Caption of Form1 will change to the value contained in Y$

Ques : If one needs to use an ampersand(&) in a Label but does not want it to be an Access Key, the _______ property of the label must be set to False.
Ans  : Caption

Ques : Which property of the Err object returns the numeric value associated with the most recent runtime error?
Ans  : Description

Ques : The event Lost_Focus of one object results in _____ of the other object:
Ans  : Got_Focus

Ques : Which of the following ADO recordset types provides the greatest degree of concurrency?
Ans  : Static

Ques : The ______ property is used to show Tool Tips or Help Balloons when the mouse rests on the object:
Ans  : ToolTipText

Ques :  Which of the following can be shown to the user using the Common Dialog control in VB?
Ans  : Common messages passed to Windows

Ques :  Which property of the form changes the form's title?
Ans  : Name

Ques : In order to enable the DBGridControl or the MSFlexGrid Control to display the contents of a table or query, you need to set only the ______ property:
Ans  : DataSource

Ques : In Visual Basic, which method can you use to send key strokes to other Window applications?
Ans  : AppActivate

Ques :  The _______ property changes the tab order at runtime:
Ans  : Tab stop

Ques : You want the code of the close command button to execute upon pressing the ESC key, even though the focus may be on another control in the form. Which property of the command button would you set to true?
Ans  : Cancel

Ques : Which collection of an ActiveX control enumerates all of the properties that can be bound to a data source?
Ans  : DataFields

Ques : You can create menus by the ________ and _________.
Ans  : Menu Editor, Application Wizard

Ques :   What is the sequence in which the following events are triggered when a form is loaded?
Ans  : Initialize, Load, Resize and Paint

Ques : Procedures declared in a _____ are local whereas procedures declared in a ______ are  available to the whole application.
Ans  : Form window, standard or code module

Ques : Which property of the ListView control determines which field a sort is based on?
Ans  : Sorted

Ques :  The method used to search for records from within a table type recordset object is:
Ans  : LookUp

Ques : Which event is triggered when the user moves to another open form?
Ans  : Unload

Ques : Which of the following is an event of the Shape control?
Ans  : GotFocus

Ques :  Which line of code listed here can be used to create a string of fixed length:
Ans  : Dim strFirstName as String

Ques : Which of the following statements is incorrect regarding toolbars?
Ans  : There can be only one toolbar on a form

Ques : The settings for the Color properties in Visual Basic are indicated by:
Ans  : Decimal Coding

Ques : What does the forms collection contain?
Ans  : A list of all forms in a project

Ques : Which of the following will perform a direct execution of a Command object?
Ans  : The Execute method

Ques : The _______ function enables a VB application to make use of the idle time and to respond periodically to events.
Ans  :  GetTime()

Ques : The Load & Activate events are associated with:
Ans  : All controls

Ques : What you must do before making calls to an ActiveX DLL project in the same Project Group?
Ans  : Compile the DLL

Ques : Name the only property supported by a collection?
Ans  : Name

Ques : Which event of a text box would you use for validating the data entered by the user?
Ans  : Validate

Ques : Which event occurs only once in the entire life cycle of an ActiveX control?
Ans  : Initialize

Ques : How can you keep the user from exiting a form by clicking the Close button?
Ans  : Place code in the Terminate event

Ques : Which of the following debug tools would you use to locate your current position in a series of embedded procedure calls?
Ans  :  Locals window

Ques : You are creating an ActiveX component that raises user-defined errors. Which of the following statements correctly raises an error to the client with error number 20000?
Ans  : Err.Raise vbObjectError + 20000

Ques :  A prepared statement is:
Ans  : Query text cached on the server

Ques : The _______ method loads the form named 'Form1' in to memory and also displays it.
Ans  :  Load Form1

Ques : You want to display the code and the description of an error. What would be the correct syntax?
Ans  : Msgbox err.no & err.text

Ques : If the CancelError Property of the CommonDialog Box is set to true then which of the following statement is true:
Ans  : A runtime error can result if the user clicks the cancel button

Ques : How do you create a read only property in a form?
Ans  : Create only a Property Set procedure

Ques : Which three methods does the collection object support?
Ans  : Let, Get, Set

Ques : Labels do not respond to _____ and ______ events.
Ans  : Got_Focus , Lost_Focus

Ques : The _______ method resets the contents of bound controls to their original values when the user clicks on the cancel button.
Ans  : UpdateControls

Ques : Which of the following is the only drag related event?
Ans  : DragEnter

Ques : You are creating an ActiveX component that raises user-defined errors. What is the valid range of error numbers that you can use for user-defined errors?
Ans  : 1-1000

Ques : Which of the following procedure types will execute when you assign a value to a property of an object?
Ans  : Property Get

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Spring MVC Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Spring MVC Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Spring MVC. Lets Start test.


Ques : In an annotation-based Spring MVC controller, which of the following are valid ways to set cache headers for a specific path?
Ans  :  Ensuring the instance of "AnnotationMethodHandlerAdapter" does not have the    "cacheSeconds" property set, and adding an instance of "WebContentInterceptor".
       Adding "final HttpServletResponse response" as a parameter, then setting the header "Cache-Control" to "all-cache".
       Using a Handler Interceptor and using the "postHandle" method provided by it.

Ques : Which of the following are valid sets of constructor arguments for the ModelAndView class? (Select all correct answers.)
Ans  :  String viewName
        String viewName, Map model

Ques :  Which of the following are possible validation methods for user input in Spring MVC?
Ans  :  Annotation validation
        Programmatic validation

Ques : Which of the following code samples will get the ServletContext inside an Interceptor?
Ans  : @Autowired ServletContext context;
       request.getSession().getServletContext();

Ques : Which of the following dependency injection (DI) methodologies are available in Spring MVC?
Ans  : Constructor-based dependency injection
       Setter-based dependency injection

Ques : Which of the following interfaces can be implemented to interact with a container's management of the bean lifecycle?
Ans  : InitializingBean
       DisposableBean

Ques : Select all authentication methods that are supported by Spring Security by default:
Ans  : Basic Authentication
       Digest Access Authentication

Ques : True or false: a factory class can hold more than one factory method.
Ans  : True

Ques : Regarding the @Resource annotation, which of the following statements is false?
Ans  :  If no name attribute is specified, the default name is derived from the field name or setter method.

Ques : Which of the following  statements is true about method arguments that have an @ModelAttribute annotation?
Ans  :  Model attributes have to be explicitly added when using @ModelAttribute.

Ques : What does the following code do?

@RequestMapping("/{id}/**")
public void foo(@PathVariable("id") int id, HttpServletRequest request) {
    String restOfTheUrl = (String) request.getAttribute(
        HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
    ...
}
Ans  :  It retrieves the partial path value (after "**") before the @RequestMapping and @PathVariable values have been parsed.

Ques : Which of the following can be used to serve static resources while still using DispatchServlet at the site's root?
Ans  :

Ques : What is the difference between the @Repository and the @Controller annotations in Spring?
Ans  : "@Repository" is used as a stereotype for the persistence layer, while "@Controller" is used as a stereotype for the presentation layer.

Ques : Which of the following annotations are supported by classes with the @Bean annotation?
Ans  :  @PostConstruct

Ques : Which of the following statements is false?
Ans  : By default, a transaction is only marked for rollback in the case of runtime unchecked exceptions.

Ques :  Which of the following statements is true about the HandlerExceptionResolver class?
Ans  : DefaultHandlerExceptionResolver converts standard Spring exceptions and converts them to HTTP Status Codes.

Ques : Given the following method:

@RequestMapping(method=RequestMethod.GET, value="/fooBar")
    public ResponseEntity fooBar2() {
      String json = "jsonResponse";
      HttpHeaders responseHeaders = new HttpHeaders();
      responseHeaders.setContentType(MediaType.APPLICATION_JSON);
      return new ResponseEntity(json, responseHeaders, HttpStatus.CREATED);
    }

Which of the following statements is correct?
Ans  : It returns a JSON String and sets the mimetype to text/javascript.

Ques : Which of the following classes provides built-in pagination functionality in SpringMVC?
Ans  : PagedListHolder

Ques : Given the method below:

@RequestMapping(value = "/foo", method = RequestMethod.GET)
public final String foo(HttpServletRequest request, BindingResult bindResult, ModelMap model) {
    model.addAttribute("abc", 123);
    return "foo";
}

When the view is displayed in the browser, it's URL is "http://mydomain/foo?abc=123".

Which of the following statements is true?
Ans  : The attribute name-value pair will be included in the URL, regardless of the use of @ModelAttribute in the controller.

Ques : Which of the following is true about the use of in a servlet?
Ans  :   activates many different annotations in beans, whether they are defined in XML or through component scanning.

Ques : Fill in the blank:
The _______ enables the use of the bean element’s attributes, instead of nested elements, to describe property values and/or collaborating beans.
Ans  : p-namespace

Ques : Which of the following statements is true about the @RequestMapping annotation?
Ans  : It supports ant-style paths.

Ques : Which of the following statements is true for the configuration of the Spring handler adapter(s) in a Spring MVC application context?
Ans  : If at least one request handler adapter is defined the context files, Spring will not create the default adapters.

Ques : Which of the following statements is true about the HandlerInterceptor interface?
Ans  : It allows exchanging the request and response objects that are handed down the execution chain.

Ques : How can an HTTP 404 status code be returned from a Spring MVC Controller?
Ans  : Having the method accept HttpServletResponse as a parameter, so that setStatus(404) can be called on it.

Ques : Which of the following is the default bean scope in Spring MVC?
Ans  : singleton

Ques : Which of the following enables custom qualifier annotation types to be registered even if they are not annotated with Spring’s @Qualifier annotation?
Ans  : CustomAutowireConfigurer

Ques : Which of the following statements is correct?
Ans  : doesn't declare its own handler mapping

Ques : Which of the following statements is true about the @RequestParam annotation?
Ans  : It indicates that a method parameter should be bound to a web request parameter.

Ques : Which of the following code samples will correctly return an image in @ResponseBody from a byte[] of image data?
Ans  : @ResponseBody @RequestMapping("/photo", method = RequestMethod.GET, produces = MediaType.IMAGE_JPEG_VALUE) public byte[] testphoto() throws IOException { InputStream in = servletContext.getResourceAsStream("/images/no_image.jpg"); return IOUtils.toByteArray(in); }

Ques : Which of the following statements are correct, with respect to using the @PreAuthorize annotation in Spring controller methods?
Ans  : @PreAuthorize works with Spring controller methods.

Ques : Which of the following is not a built-in Spring MVC bean scope?
Ans  : local session

Ques : Fill in the blank: _______ is a class-level annotation indicating that an object is a source of bean definitions.
Ans  : @Configuration

Ques : Fill in the blank:
When defining a bean that is created with a static factory method, the ______ attribute is used to specify the class containing the static factory method.
Ans  : class

Ques : Which of the following statements is true about the @ModelAttribute annotation?
Ans  : It can be used to expose reference data to a web view.

Ques : Fill in the blank:
In Spring's XML-based configuration, the _______ attribute of the element specifies a property or constructor argument as a string representation.
Ans  : name

Ques : Which of the following statements is/are true about autowiring in Spring?
Ans  : Fields are injected after the construction of a bean.

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance C Programming Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance C Programming Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of C Programming. Lets Start test.


Ques : Which of the following statements will result in a compilation error?
Ans  :  int n=5, x; x= ++n++;
        int n=5, x; x= (n+1)++;
        int n=5, x=6; x= (n+x)++;


Ques : Which of the following statements are correct for the keyword register?
Ans  : It requests that the variable be kept in the CPU register for maximum speed
       It does not guarantee that the variable value is kept in CPU register for maximum speed

Ques : Which is/are the type/s of memory allocation that needs/need the programmer to take care of memory management?
Ans  : Dynamic memory allocation
       Memory allocation on stack

Ques : Given the array:

int num[3][4]= {
                    {3,6,9,12},
                    {15,25,30,35},
                    {66,77,88,99}
                    };
what would be the output of *(*(num+1)+1)+1?
Ans  : 26

Ques : Given the array:

int num[3][4]=
{
{3,6,9,12},
{15,25,30,35},
{66,77,88,99}
};

what would be the output of *(*(num+1))?
Ans  : 15

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
        int i=5;
        char option = 5;
        switch(option)
        {
                case '5':
                                printf("case : 1 \n");
                                break;
                case i:
                                printf("case : 2 \n");
                                break;
                default:
                                printf("case : 3 \n");
                                break;
        }
        return 0;
}
Ans  : Result in compilation error

Ques : What is the return value in case a file is not opened successfully by using fopen()?
Ans  : NULL

Ques : What will be the output of following code?

int main()
   {
      int i;
      i = 0;
      for (i = 1; i <2 b="" i="">
      {
          i++;
          printf( "%d", i );
          continue;
          printf( "%d", i );
      }
      return 0;
   }
Ans  : 2

Ques : What would be printed on the standard output as a result of the following code snippet?

char *str1 = "Hello World";
strcat(str1, '!');
printf("%s", str1);
Ans  : The code snippet will throw a compilation error

Ques : Given the following array:

int a[8] = {1,2,3,4,5,6,7,0};
what would be the output of
        printf("%d",a[4]); ?
Ans  : 5

Ques : In order to read structures/records from a file, which function will you use?
Ans  :  fscanf()

Ques :  An array is defined with the following statement in a file, file1.c

        int a[ ] = { 1, 2, 3, 4, 5, 6 };

In another file, file2.c, the following code snippet is written to use the array a:

extern int a[];
int size = sizeof(a);

What is wrong with the above code snippet?
Ans  : An extern array of unspecified size is an incomplete type. The size of the operator during compile time is unable to learn the size of an array that is defined in another file

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
        char *s="Hello World";
        char s1[20], s2[20];
        int len = sscanf(s,"%s",s1);
        printf("%s : %d", s1, len);
}
Ans  : Hello : 1

Ques :  Suppose there is a file a.dat which has to be opened in the read mode using the FILE pointer ptr1, what will be the correct syntax?
Ans  :  ptr1 = fopen("a.dat","r");

Ques : Given the following array:
     
char books[][40]={
                         "The Little World of Don Camillo",
                         "To Kill a Mockingbird",
                         "My Family and Other Animals",
                         "Birds, Beasts and Relatives"
                         };
what would be the output of printf("%s",books[3]);?
Ans  : Birds, Beasts and Relatives

Ques : What would be printed on the standard output as a result of the following code snippet?

void main()
{
    unsigned char a=25;
    a = ~a;
    signed char b = 25;
    b = ~b;
    printf("%d %d ", a, b);
}
Ans  : 230 -26

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
        int num1 = 30, num2 = 4;
        float result;
        result = (float)(num1/num2);
        printf("%.2f", result);
        return 0;
}
Ans  : 7.00

Ques : Which of the following is/are the correct signature/s of main with command line arguments?
Ans  :  int main(int argc, char *argv[])

Ques : From which of the following loop or conditional constructs, is "break" used for an early exit?
Ans  :  All of the above

Ques : Given the operators:

1) *
2) /
3) %

What would be the order of precedence?
Ans  : 1 and 2 have the same precedence, 3 is of lower precedence

Ques : Which of the following declarations of structures is/are valid?

        1)
                struct node {
                int count;
                char *word;
                struct node next;
                }Node;
        2)
                struct node {
                int count;
                char *word;
                struct node *next;
                }Node;
        3)
                struct node {
                int count;
                char *word;
                union u1 {
                        int n1;
                        float f1;
                }U;
                }Node;
Ans  : 1,2,3

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
        int n=5, x;
        x = n++;
        printf("%d ", x);
        x = ++n;
        printf("%d ", x++);
        printf("%d", x);
        return 0;
}
Ans  : 5 7 8

Ques : In which area of memory are static variables allocated?
Ans  :   heap

Ques : Read the statement below:

extern int a;

Which of the following statement/s pertaining to the above statement is/are correct?
Ans  :  Brings the scope of the variable defined outside the file to this file

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
char *pmessage = "asdfgh";
*pmessage++;
printf("%s", pmessage);
return 0;
}
Ans  : sdfgh

Ques :  Which function returns the current pointer position within a file?
Ans  : ftell()

Ques : Which of the following is a function for formatting data in memory?
Ans  : sprintf()

Ques : Which function allocates memory and initializes elements to 0?
Ans  :   calloc()

Ques : Is the following statement correct? If not, why not? If yes, what is the size of the array?

int array[][3] = { {1,2}, {2,3}, {3,4,2} };
Ans  : Yes, the size is three columns by two rows

Ques : Which of the following sets of conversion statements may result in the loss of data?
Ans  :    int i; float f; i=f; f=i;

Ques : Consider the following code.

int i = 4, *j, *k;

Which one of the following statements will result in Compilation error?
Ans  : j = j * 2;

Ques : By which file function you can position the file pointer in accordance with the current position?
Ans  : fseek()

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
        int arr[][2] = {1,2,3,4,5,6};
        printf("%d",arr[2][1]);
}
Ans  : 6

Ques : Which function will you use to position the file pointer at the beginning of the file?
Ans  : rewind()

Ques : Which header file are methods(or macros) isalpha(), islower() a part of?
Ans  :  ctype.h

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
    int i,j,k;
    i=4;
    j=30;
    k=0;
    k=j++/i++;
    ++k;
    printf("%d %d %d",i,j,k);
}
Ans  :  5 31 8

Ques :  What would be printed on the standard output as a result of the following code snippet?

main()
{
enum {red, green, blue = 6, white};
printf("%d %d %d %d", red, green, blue, white);
return 0;
}
Ans  :  0 1 6 7

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
    int a[5] = {1,4,5,6,9};
    printf("%d\t", *a);    //Line 1
    printf("%d", *++a);    //Line 2
return 0;
}
Ans  : Compilation Error in "Line 2"

Ques : Which of the following standard functions is used to close a file?
Ans  :  fclose()

Ques : Identify the incorrect statement.
Ans  : Memory is reserved when a structure label is defined

Ques : Which of the following comparison statements will be true if an integer is 16 bits and a long is 32 bits on a machine?
Ans  : -1L > 1U

Ques :  Which of the following is the correct way of initializing a two-dimensional array?
Ans  :  char str[2][4]={ {'a','b','c','\0'}, {'d','e','f','\0'} };

Ques :   Which function will you use to write a formatted output to the file?
Ans  :  fprintf()

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
        char option = 5;
        switch(option)
        {
                case '5':
                                printf("case : 1 \n");
                                break;
                case 5:
                                printf("case : 2 \n");
                                break;
                default:
                                printf("case : 3 \n");
                                break;
        }
        return 0;
}
Ans  : case : 2

Ques : What would be printed on the standard output as a result of the following code snippet?

#define func(t, a, b) { t temp; temp=a; a=b; b=temp; }
main()
{
        int a=3, b=4;
        float c=4.5, d = 5.99;
        func(int, a, b);
        func(float, c, d);
        printf("%d %d ", a, b);
        printf("%.2f %.2f\n", c, d);
}
Ans  : 4 3 5.99 4.50

Ques : What would be printed on the standard output as a result of the following code snippet?

main()
{
        void addup (int b);
                addup(b);
        return 0;
}
int b = 5;
void addup (int b)
{
        static int v1;
        v1 = v1+b;
        printf("%d ", v1);
}
Ans  : Will result in Compilation Error

Ques : Given the following array declaration:

       int a[2][3][4];
what would be the number of elements in array a?
Ans  : 24

Ques : Which file header is to be included for file handling in a C program?
Ans  : stdio.h

Ques : What is the return type of the following function declaration?

func(char c);
Ans  : undefined

Ques : What is the function to concatenate two strings?
Ans  :      strcat()

Ques : Which of the following statements is valid and correct?
Ans  : char amessage[] = "lmnop"; amessage++;

Ques : Which of the following is not a valid mode for opening a file?
Ans  : i

Ques : Given the following array:

        char books[][40]={
                         "The Little World of Don Camillo",
                         "To Kill a Mockingbird",
                         "My Family and Other Animals",
                         "Birds, Beasts and Relatives"
                          };
what would be the output of printf("%c",books[2][5]);?
Ans  : m

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
        char arr[] = {'R','A','M','\0'};
        printf("%d",strlen(arr));
}
Ans  : 3

Ques : Which function will convert a string into a double precision quantity?
Ans  : atof()

Ques : Which of the following is not a type of operator ?

Ans  : Ternary

Ques : The declaration int *(*p)[10] indicates:
Ans  :  p is a pointer to an array of integer pointers

Ques : What is the output of the following program ?

main()
{

int u = 1, v = 3;
printf("%d %d",u,v);
funct1(&u,&v);
printf(" %d %d\n",u,v);
}

void funct1(int *pu, int *pv)
{
*pu=0;
*pv=0;
return;
}
Ans  :  1 3 0 0

Ques : What would be printed on the standard output as a result of the following code snippet?

main( )
{
char *str[ ] = {
"Manish"
"Kumar"
"Choudhary"
};
printf ( "\nstring1 = %s", str[0] );
printf ( "\nstring2 = %s", str[1] );
printf ( "\nstring3 = %s", str[2] );
}
Ans  : string1 = ManishKumarChoudhary string2 = (null) string3 = (null)

Ques : Which standard function is used to deallocate memory allocated by the malloc() function?
Ans  : free

Ques : The declaration int (*p[5])() means:
Ans  : p is an array of pointers to functions the return type of which is an integer

Ques :What will be printed on the standard output as a result of the following code snippet?

void main()
{
        int arr[5]={1,2,3,4,5};
        printf("%d\n", *(arr+4));
}
Ans  : 5

Ques : What does the argv[0] represent?
Ans  :  The program name

Ques : What will happen when the following code is executed?

void main()
{
    char arr1[] = "REGALINT";
    char arr2[10] = "REGALINT";
    printf("%d,",sizeof(arr1));
    printf("%d",sizeof(arr2));
}
Ans  :   9,10

Ques : What would be printed on the standard output as a result of the following  code snippet?

main()
{
        enum {red, green, blue = 0, white};
        printf("%d %d %d %d", red, green, blue, white);
        return 0;
}
Ans  : 0 1 0 1

Ques : What is wrong with the following function prototype statement?

int func();
Ans  : While calling a function, the type int is not needed

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
        char arr[] = {'R','A','M'};
        printf("%d",strlen(arr));
}
Ans  : Cannot be determined

Ques : Which of the following is not a storage type?
Ans  :  auto

Ques :If a two dimensional array arr[4][10](an array with 4 rows and 10 columns) is to be passed in a function, which of the following would be the valid parameters in the function definition?
Ans  :  fn(int arr[4][10])

Ques : Which of the following is not a string function?
Ans  : strcomp()

Ques : What would be printed on the standard output as a result of the following code snippet?

char i = 'A';
char *j;
j = & i;
*j = *j + 32;
printf("%c",i);
Ans  : a

Ques : What will be printed on the standard output as a result of the following code snippet?

void main()
{
        char arr1[] = "REGALINT";
        printf("%d,",strlen(arr1));
        printf("%d",sizeof(arr1));
}
Ans  : 8,9

Ques : What will be printed on the standard output as a result of the following code snippet?

int funr(int x, int y)
{
        if(x <= 0)
        {
                   return y;
        }
        else
        {
                return (1+funr(x-1,y));
        }
}

void main()
{
    printf("%d",funr(2,3));
}
Ans  : 5

Ques : What would be printed on the standard output as a result of the following code snippet?

#define Name Manish
main()
{
printf("My name""Name");
}
Ans  : My nameName

Ques : What will be printed on the standard output as a result of the following code snippet?

main()
{
        int num = 425;
        printf("%d", printf("%d", num));
}
Ans  : 4253

Ques : What would be printed on the standard output as a result of the following code snippet?

main()

{

        signed char i = 1;

        for (; i<=255; i++)

        printf ("%d ",i);

        return 0;

}
Ans  : 1 2 3 . . . 127 -128 -127 ... 0 1 2 3 . . . (infinite times)

Ques :   What would be printed on the standard output as a result of the following code snippet?

#define max(a, b) ((a) > (b)?(a):(b))
main()
{
        int a=4;
        float b=4.5;
        printf("%.2f\n",max(a, b));
}
Ans  : 4.50

Ques :  Which of the following is not a file related function?
Ans  : puts()

Ques : What would be printed on the standard output as a result of the following code snippet?

#define max(a, b)((a) > (b)?(a):(b))
main()
{
int a=4, c = 5;
printf("%d ", max(a++, c++));
printf("%d %d\n", a,c);
}
Ans  : 6 5 7

Ques : Which of the following file modes would mean read + append?
Ans  : a+

Ques : What would be printed on the standard output as a result of the following code snippet?

int Recur(int num)
{
if(num==1 || num==0)
return 1;
if(num%2==0)
return Recur(num/2)+2;
else
return Recur(num-1)+3;
}

int main()
{
        int a=9;
        printf("%d\n", Recur(a));
        return 0;
}
Ans  : 10

Ques : What will happen when the following code is executed?

{
int num;
num =0;
do {-- num;
printf("%d\n", num);
num++;
} while (num >=0);
}
Ans  : The loop will run infinitely

Ques : Which of the following functions is used to extract formatted input from a file?
Ans  :  fscanf()

Ques : What does the following function do?

int fn(unsigned int x)
{
        int count = 0;
        for(; x!=0; x&=(x-1))
                count++;
        return count;
}
Ans  : Returns the number of 1 bits(bits having one) in the number x

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Programming Aptitude Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Programming Aptitude Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Programming Aptitude. Lets Start test.


Ques : He cannot dance because he is a singer. Which out of the following is the most appropriate conclusion
Ans  : Some singers cannot dance.

Ques : Given below is a set of numbers. Find the missing number.

354, 180, 64, ___, 10.2, 8.7
Ans  : 21

Ques :  A man is climbing up a cliff. He climbs six meters in one minute and falls down three meters in the next minute. This sequence goes on throughout the climb. Calculate the time taken to reach the top if the cliff is 60 meters high?
Ans  : 39 minutes

Ques : Four people, Peter, Smith, Jack, and Tom, arrive at the airport. If three people are speaking the truth and only one is lying, who is the first person to arrive at the airport?

Peter: "Tom got here first."
Smith: "Peter arrived later than Tom."
Jack: "Smith is lying."
Tom: "I arrived earlier than Jack."
Ans  : Tom

Ques : Given below is a set of numbers. One of the numbers does not belong to the set. Which one is it?

36, 157, 303, 470, 666, 891
Ans  : 303

Ques : How many A's in the following sequence are immediately preceded by B but not immediately followed by C?

CABDACBAEBACDBCADBAEBAFCAB
Ans  : 3

Ques : In a certain code, "how are you" is written as 'dmadv vitres zonki', 'are you jack' is written as 'vitres zonki jack' and 'flowers are beautiful' is written as 'dregres vitres istebla'. What is the code for 'are'?
Ans  : vitres

Ques : In a sports tournament, team R is at the top in the league while team O has less points than team R but more points than team B. If team C has more points than team V and team V is exactly below team O, which team is at the second place?
Ans  : C

Ques :  Find the next number in the series 1, 3, 15, 45, 225, ___?
Ans  : 675

Ques : If '+' means '-', '/' means '+', '-' means '*' and '*' means '/', what would be the value of 3030 / 20 * 50 + 10 - 220?
Ans  : 830.4

Ques : A, B, C, D, and E are five children studying in a class. D is taller than A. B is shorter than C but taller than E. C is taller than D. E is taller than A. Who among the following is the shortest in height?
Ans  : A

Ques : In a certain code,
P$Q means P is the brother of Q,
P@Q means P is the daughter of Q,
P%Q means P is the grandfather of Q, and
P*Q means P is the son of Q.

Which of the following expressions represents the relationship: P is the father of R?
Ans  : P*Q%R

Ques : Four friends, A, B, C, and D, decide to save money in a bank. The bank's specialty is that every month, the money gets doubled. At the end of the second month, A withdraws $50 from the bank. At the end of the third month, B withdraws $50 from the bank. At the end of the fourth month, C withdraws $50 from the bank. At the end of the fifth month, D withdraws $50.016 from the bank. After the last withdrawal, their balance in the bank becomes zero. Calculate how much amount the four friends had deposited in the bank?
Ans  : $23.438

Ques : In a certain code, INTELLIGENT is written as EJPAHHECAJP. How is HUMOROUS written in the same code?
Ans  : DQIKNKQO

Ques : Find the missing number in the above diagram.
Ans  : 31

Ques : If some fruits are vegetables, all vegetables are plants, some plants are leaves and all leaves are green, which of the following is the most appropriate answer?
Ans  : Some vegetables are leaves.

Ques : A man buys a table for $60. After a year, the value of the table has increased to $70 and he decides to sell the table. But a few days later, he regrets his decision to sell the table and buys it again. Unfortunately, he has to pay $80 to get it back. So he loses $10. After another year of owning the table, he finally decides to sell the table for $90. What is the overall profit or loss the man makes?
Ans  : A profit of $20

Ques : When Jack sleeps, Jill starts crying and Peter starts laughing. If Peter is not laughing, which of the following is the most appropriate conclusion?
Ans  : Jack is not sleeping but Jill is crying.

Ques : If all players are young and young players are strong, which of the following is the most logical conclusion?
Ans  : Those who are strong are players.

Ques : There are five people, A, B, C, D and E. A is older than B. C is older than D. D is older than E. B and E are of exactly the same age.
If the above information is true, which of the following must also be true?
Ans  : A is older than E.

Ques : If Sophie has five friends in the class and no one else has five friends, which out of the following is the most appropriate answer?
Ans  :  At least 1 student in the class has 5 friends.

Ques : Find the next number in the series 4, -5, 11, -14, 22, ___?
Ans  :  -27

Ques : A bus travels from point A to point E. At stop B, it drops seven passengers and picks up twelve. At point C it drops four passengers and picks up one third of the passengers as compared to the passengers picked up at point B. At point D, it drops five passengers and picks up double the number it drops. At point E, it picks up five passengers and drops half the number as compared to the passengers dropped at point C. If there are twenty passengers in the bus at point E, how many passengers were there in it at point A?
Ans  : 7

Ques : Look at the following arrangement?

8Z5*CD2%J$7SQRI@Z12
What will come in place of the question mark (?) in the following series based on the above arrangement?
58C
*ZD
C52
?
Ans  : D*%

Ques : If all buses are cars, all cars are trains, all trains are trucks and no truck is a scooter, which of the following is the most appropriate answer?
Ans  : All buses are trucks.

Ques : On an average, Robert drinks 360 bottles of wine in a year. Which of the given statements would be true?
Ans  : Robert drinks less than 8 bottles of wine in a week.

Ques : Albert repays three installments, a, b and c, of a loan that he had taken for buying an electric heater. The total of the first installment and the second installment is $150. The total of the second installment and the third installment is $200. The total of the third installment and thrice the first installment is $250. What is the third installment?
Ans  : $100

Ques : There are four birds A,B,C, and D. A can fly eight miles farther than B. B can fly five miles farther than C. A can fly thirteen miles farther than C. D can fly twenty miles farther than A. Which one can fly the farthest?
Ans  : D

Ques : On hearing the letter 'A', an athlete jumps once, on hearing the letter 'B', he jumps thrice and on hearing the letter 'C', he jumps twice. If the sequence in which he jumps is ABCCBABCACCB, how many times did the athlete jump?
Ans  : 25

Ques : A dial clock shows the time as quarter past eight when seen through a mirror. What is the actual time shown by the clock?
Ans  : Quarter to four

Ques : If all dogs are faithful and some dogs are pets, which out of the following is the most appropriate answer?
Ans  : All dogs that are pets are faithful.

Ques : A watch shows the correct time at midnight and then begins to lose 15 minutes per hour. Six hours ago, it stopped completely. If the clock now shows the time as 3:45 a.m., what is the time now?
Ans  :  11:00 a.m.

Ques : Jack refused to buy a computer offered to him by Sam for $2048. A year later, Sam again offered Jack the same computer for $1280 but Jack refused again. The next year, he again offered Jack the same computer for $800. One year after that, the computer was again offered but Jack did not buy it. The following year, Jack bought the computer from Sam for $312.50. If the rate of discount offered every year were constant, at what price was the computer offered in the fourth year?
Ans  :  $500

Ques : If some caps are hats, some hats are umbrellas, some umbrellas are coats and all coats are shirts, which of the following is correct?
Ans  : Some shirts are umbrellas.

Ques : Find the next number in the series 10, 2, 8, 2, 6, 2, __?
Ans  : 4

Ques : If engineers are called 'goats', doctors are called 'sheep', lawyers are called 'ducks', painters are called 'sparrows' and singers are called 'lions', what will Peter be called if he left engineering to become a painter and is now a singer?
Ans  : lion

Ques : Statement:Some teachers are lawyers and no lawyer is a doctor. What is the correct conclusion from the given statement?
Ans  : Some lawyers are teachers.

Ques : The cost of the first camera is three eighths more than that of the second and the cost of the third camera is five eighths more than that of the second one. If the total cost of all the three cameras is $12000, what will be the cost of the second camera?
Ans  :  $6000

Ques : In a certain code, P$Q means P is a brother of Q, P@Q means P is daughter of Q, P%Q means P is the grandfather of Q, P*Q means P is a son of Q. Which of the following expressions represents the relationship: A is the father of C?
Ans  : A*B%C

Ques : If some books are pens, all pens are tables, all tables are chairs and no chair is an eraser, which of the following is correct?
Ans  : No table is an eraser.

Ques : What is the value of R in the following set of equations?

1) P + Q = 2
2) R x P + Q = 5
3) P + R x Q = 7
Ans  : 5

Ques : If pencils are cheaper than pens, and pens are cheaper than erasers; and Peter does not have enough money to buy 5 pens, which of the following will be the most appropriate answer?
Ans  : Peter has money to buy pencils but not enough money to buy pens.

Ques : In a basketball tournament, a player scored three points in his first match. In the second match, he scored five points more than he scored in the first match. In the third match, he scored five times more points as compared to the first match. The points in the fifth and the sixth matches were thirty five and forty eight points respectively. Calculate the points which the player scored in his fourth match, if all the points scored follow a particular pattern?
Ans  : 24

Ques : If all bells are made from brass, brass is a metal and some metals are yellow in color, which of the following is/are the most appropriate answer/s?
Ans  :  Bells are made from metal.

Ques : In a certain code, BREAD is written as $#*@!, and BUTTER is written as $3%%*#. How is RUBBER written in that code?
Ans  : #3$$*#

Ques : If all red flowers are white and no white flowers are pink, which of the following is the most appropriate answer?
Ans  :  No red flower is pink.

Ques : What would come in place of the question mark in the following letter-number series?

D8W
J27Q
P64K
?
Ans  :  V125E

Ques : Statement:Some teachers are lawyers and no lawyer is a doctor. What is the correct conclusion drawn from the given statement?
Ans  : Some lawyers are teachers.

Ques : Peter purchased three cameras. The cost of the first camera is 3/8-times the cost of the second camera, and the cost of the third camera is 5/8-times the cost of the second camera. If the total cost of the three cameras is $12,000, what is the cost of the second camera?
Ans  : $6,000

Ques : A certain clock shows the correct time at midnight and then begins to lose 15 minutes per hour. Six hours ago, when it stopped completely, it showed the time as 3:45 a.m. What is the time now?
Ans  : 11:00 a.m.

Ques : If all dogs are faithful and some dogs are pets, then which of the following is the most appropriate answer?
Ans  : All pets that are dogs are faithful.

Ques : Carefully study the following arrangement:

8Z5*CD2%J$7SQRI@Z12

What will replace the question mark (?) in the following sequence, which is based on the above-given arrangement?
58C
*ZD
C52
?
Ans  : D*%

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance PostgreSQL RDBMS Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance PostgreSQL RDBMS Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of PostgreSQL RDBMS. Lets Start test.


Ques : Which authentication methods are supported by PostgreSQL?
Ans  :  Trust
        PAM
        LDAP
        Radius
        Password

Ques : Which index types are supported by PostgreSQL?
Ans  :  B-tree
        GiST
        Hash
        GIN

Ques : Out of the following backup approaches, which ones are applicable to PostgreSQL?
Ans  : SQL dump
       File system level backup
   Continuous archiving

Ques : In the following operation, which ones can trigger a trigger?
Ans  : insert
       update
   delete

Ques : Which index types support multicolumn indexes?
Ans  : B-tree
       GiST
   GIN

Ques : What kind of triggers are offered by PostgreSQL?
Ans  : Per-row triggers
      Per-statement triggers

Ques : Which of the following statements will cast the integer value 1 to type text?
Ans  :  SELECT CAST(1, text) as cast_integer;
        SELECT 1::text AS cast_integer;
 
Ques : Are the contents of the pg_autovacuum system catalog saved when pg_dumpall is used to backup the database?
Ans  : No

Ques : Can deferrable constraints be deferred by a trigger?
Ans  : Yes

Ques : After a PostgreSQL installation, how will you create the database cluster?
Ans  :  With initd

Ques : Consider the following query:

Create table foo (bar varchar);

What will be the size limit of the bar?
Ans  :  No limit (It will be equivalent to the text)

Ques : What is the difference between to_tsvector() and ::tsvector ?
Ans  :  to_tsvector () can be used in select statements, while ::tsvector cannot

Ques : While creating a trigger, the function it will call may be created after it and attached to it.
Ans  : True

Ques :  What is the command used to import a backup made with pg_dumpall > file.dmp?
Ans  :  psql -f file.dmp

Ques : An ISO-8601 time may be entered into a table using the numeric format 012411 instead of 01:24:11.
Ans  : True

Ques : Consider the following empty table:

CREATE TABLE example (
    a integer,
    b integer,
    c integer,
    UNIQUE (a, c)
);

Which of the following inserts will cause an error?
Ans  : insert into example (a, b, c) values (1, 2, 3), (1, 4, 3);

Ques : What is the effect of turning fsync off in postgresql.conf?
Ans  : File synchronization will be deactivated

Ques : What is the ~ operator?
Ans  : POSIX regular expression match operator

Ques : What is the default ordering when ORDER BY is not specified?
Ans  : The ordering is unknown if not specified

Ques : Which one of the following text search functions does not exist?
Ans  :  plainto_tsvecto

Ques : Which PostgreSQL version added the enum datatype?
Ans  : 8.0

Ques :  While creating a table with a field of the serial type, a sequence will be created.
Ans  :  True

Ques : What can be stored in a column of type decimal(4,3)?
Ans  : 4 numeric values with up to 3 digits to the right of the decimal point.

Ques : What interfaces are available in the base distribution of PostgreSQL?
Ans  : C

Ques : A table can have only one primary key column.
Ans  : True

Ques : What command will correctly restore a backup made with the following command?
pg_dump -Fc dbname > filename
Ans  : psql -f filename dbname

Ques :   How can you configure PostgreSQL autovacuum?
Ans  : By editing postgresql.conf

Ques :  What library is used by PostgreSQL for encryption?
Ans  : None of the above

Ques : On a UNIX system, what is the best way to prevent all non-local connections to the postmaster?
Ans  :  None of the above

Ques : How will you change the TCP port which PostgreSQL will listen to?
Ans  : By changing "port" in postgresql.conf

Ques : Which of the following queries will create a table with two fields, "id" and "name" with "id" as an auto incrementing primary key?
Ans  :  create table foo (id serial primary key, name varchar(255));

Ques : How will you list the available functions from psql?
Ans  :  \df

Ques : What is the well known port number for the postgresql database service?
Ans  : 5432

Ques : What is true regarding file system backup?
Ans  : All of the above

Ques : How do you alter a column to forbid null values?
Ans  : None of the above

Ques : What is the storage size of an integer on a 64bit system?
Ans  : 4bytes

Ques : Which function should be used to highlight the results?
Ans  :  ts_highlight

Ques : When using LIKE to compare strings, what is the wildcard operator (operator which matches zero or more characters)?
Ans  : *

Ques : For proper results, which of the following should contain a tsvector?
Ans  : Lexemes

Ques : Which of the following statements will produce an error?
Ans  :  SELECT now()::int;

Ques : To backup a database, the postmaster daemon must be halted.
Ans  : True

Ques : The following statement will retrieve the second element of the array column products in table store_products.

SELECT products[1] FROM store_products;
Ans  : True

Ques : SELECT 'infinity'::timestamp;

Will this statement produce an error?
Ans  : Yes

Ques :  What is the difference between tokens and lexemes?
Ans  :  A lexeme is a string while a token is an intege

Ques : Which kind of index can be declared unique?
Ans  : Hash

Ques :  SELECT rtrim('foobar', 'abr');

The result of this statement is foo.
Ans  : True

Ques : SELECT !!3;

What output will this statement give?
Answers:
Ans  : 6

Ques : How do you create a table with a field of the int array type?
Ans  : create table foo (bar integer[]);

Ques : create table foo (bar integer[]);
Ans  : None of the above

Ques : Which of the following statements will create a table with a multidimensional array as second column?
Ans  : CREATE TABLE favorite_books (customer_id integer, themes_and_titles text[][]);

Ques : If max_connections is 10 and 10 connections are currently active, how can you be sure the superuser will be available to connect?
Ans  :  Set superuser_reserved_connections in postgresql.conf

Ques : How will you rank text search results?
Ans  : With the ORDER BY operator

Ques : Which of the following statements will create a table special_products which is a child of the table store_products?
Ans  : CREATE TABLE special_products (quality int) INHERITS store_products;

Ques : Which of the following statements will create a table?
Ans  : SELECT * INTO products_backup FROM special_products;

Ques : Which of the following statements will retrieve the number of values stored in an array column?
Ans  : SELECT array_dims(products) FROM store_products;

Ques : Does PostgreSQL support SSL?
Ans  : Yes

Ques : Given a table special_products that inherits from a table store_products, which of the following statements will modify store_products only without affecting its child table?
Ans  : UPDATE ONLY store_products SET name = 'Wine' WHERE id = 2;

Ques : How do you select a single random row from a table?
Ans  : SELECT * FROM tab ORDER BY random() LIMIT 1;

Ques : PostgreSQL triggers can be written in C directly.
Ans  : True

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance PC Graphics Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance PC Graphics Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of PC Graphics. Lets Start test.


Ques : Which of the following is/are basic phases of creating 3-D computer graphics?
Ans  : 3-D modeling + 3-D rendering+Computer animation

Ques : Which of the following are common shading models?
Ans  :  flat + Gouraud +Phong

Ques : Which of the following statements about pixels are true? (Answer all that apply.)
Ans  : A pixel has a dimension + Pixels are visible +  A pixel can have coordinates.

Ques : Which of the following is/are typical steps in a graphical pipeline that converts three-dimensional objects for two-dimensional display or printing?
Ans  : Rasterization +Viewport mapping and clipping

Ques : Which of the following colors belong to the standard four-color subtractive color model used in color printing or otherwise used to describe the printing process?
Ans  : Magenta +  Yellow

Ques : Which of the following colors belong to the most common three-color additive color model used in video displays or otherwise used to describe the physical concepts involved?
Ans  : Red + Green

Ques : Which of the following file formats are popular vector-graphics formats?
Ans  :   EPS  + SVG

Ques : What is meant by the term projection?
Ans  : The process of mapping three dimensional images to two dimensions for display.

Ques : Which of the following raster graphics editors used to process digital graphics and photographs is/are open source, instead of being proprietary?
Ans  : GIMP

Ques :  Which one of the following graphics standard specifications is the main competitor to Microsoft's Direct3D (the 3D graphics API within DirectX)?
Ans  : OpenGL

Ques : What does the term "jaggies" imply?
Ans  : The stair-step effect seen along curves and edges in text or bit-mapped graphics.

Ques : What does the term "spline" imply?
Ans  : In computer-aided design, a smooth curve that runs through a series of given points.

Ques : A modeling technique based upon a formal grammar whereby complex shapes are recursively generated from relatively simpleprocedures is termed as:
Ans  : Graftal

Ques : he process of using an image described in a vector-graphics format and converting it into a bitmapped image as output on a display or printer, or as storage in a bitmapped file is known as
Ans  : Rasterization

Ques : Which one of the color parameters measures how far away the color is from gray?
Ans  : Hue

Ques : Which of the following techniques reduces the appearance of jagged edges of lines and edges in raster graphics?
Ans  : Anti-aliasing

Ques : The process whereby a specific key color (often blue or green) within an image is made transparent when that image is mixed with another image is known as
Ans  : Chroma keying

Ques : Which of the following graphic formats allow for animation?
Ans  : GIF

Ques : A process in 2-D computer graphics whereby a closed vector path is used to mask (block) parts of an image is known as:
Ans  : Clipping path

Ques : What is meant by the term crop?
Ans  : Trimming or masking of photos, graphics, drawings, or illustrations

Ques : Which of the following graphical formats is/are always low-resolution (8-bit) bitmap graphics?
Ans  : GIF

Ques : The vector-graphics package that was developed by Microsoft is:
Ans  : Visio

Ques : _________ adds appropriately colored pixels to an image to make it seem as though more colors were present in the original.
Ans  :Over print

Ques : What does the term "stroke weight" denote?
Ans  :  A term that illustration software uses to specify the thickness of a line when drawing a path.

Ques : The effect that occurs when an object nearer to the viewport in 3-D space blocks (masks) another, more distant object from view is called:
Ans  : Depth

Ques : What is meant by the term rigging?
Ans  : The process of linking a 3-D object, such as modeling a character, to its bone structure (skeletal animation).

Ques : A technique for achieving higher quality in lower-quality images is called __________. It takes advantage of an optical illusion to simulate 24-bit quality with 8-bit or 16-bit images:
Ans  : Dithering

Ques : Which one of the following is a data structure used to organize objects within a space, which can be used in hidden-surface removal and in ray tracing?
Ans  : Binary space partitioning (BSP) tree

Ques :  What does the term "constraint" imply?
Ans  : A rule or condition that must be followed regarding how the individual objects within an graphic can or cannot move, such as a wrist having to be attached to both a hand and an end of the lower arm.

Ques : What is meant by the term fog?
Ans  : The mixing of an image with a fixed color that thickens as the image's pixels get further away from the viewpoint.

Ques : The first procedure in the OpenGL pipeline is to transform a 3-D point that is defined in the object coordinate system into the world coordinate system. This step has three possible transformations: rotation, scaling, and translation. Which one of those below is typically the  correct order for executing these three transformations?
Ans  :   First rotation, then translation, and then scaling.

Ques : In computer animation, the entire frame is redrawn for each frame. What of the following would reduce flicker between frames?
Ans  : Double buffering

Ques : Bitmapped graphics are also known as:
Ans  : Raster graphics

Ques :  Select from the following choices the one that most closely completes the Shannon sampling theorem: "The ideal samples of a continuous function contain all the information in the original function if and only if the continuous function is sampled at a frequency ________________ the highest frequency in the function."
Ans  :  Equal to

Ques : In computer graphics, when a line or object is moved where one end or point stays fixed in position is termed as:
Ans  : Rubber banding

Ques :  Which of the following best describes the term "vertex-vertex polygon mesh?"
Ans  : The simplest mathematical representation of a mesh, but which is not widely used due to the lack of explicit face and edge information.

Ques : Which of the following polygon meshes is most commonly used in mesh modelling because its input data are more readily acceptable to modern hardware?
Ans  : Vertex-face mesh

Ques : Which of the following rotation techniques gives the best results?
Ans  : Quaternions

Ques : What is meant by the term gradient?
Ans  :  A color (or grayscale) fill that gradually blends from one color to another, perhaps from light to dark, for example.

Ques : The serial execution of the processes applied to geometric primitives (text, lines, polygons, curves, and surfaces) in a graphics package to produce two-dimensional output is called its
Ans  :  Rendering pipeline

Ques : Another term for the video output device for storing the graphic image as it is being formed and later used for displaying the image is:
Ans  : Frame buffer

Ques : An image rendering process that builds images based upon the propagation of light rays and the effects of absorption, reflection, and refraction associated with the objects being scanned is termed as:
Ans  : Ray tracing

Ques : Images based upon geometric elements, such as points, curves, and surfaces, that follow mathematical equations are called:
Ans  : Vectors

Ques : What does the term "depth sort" imply?
Ans  : An algorithm for creating a hidden-line drawing of polygon data sets by drawing the polygons from the most distant to the closest, in order.

Ques : What does the term "bezier" imply?
Ans  : The term that describes one way that illustration software may create curves and shapes by using control points and control handles.

Ques :In computer graphics, a technique in which irregularities in shading are created for simulating rough textures is called:
Ans  :Bump mapping

Ques : When considering illumination from light sources, which of the following types of light sources has the same intensity in all directions:
Ans  :  Point source

Ques : Which of the following is the most commonly used lighting model?
Ans  : Phong

Ques : What does the term "flythrough" imply?
Ans  :  A type of animation in which the camera moves around a scene, rather than objects moving in front of a stationary camera.

Ques : The number of bits per pixel typically used for the color depth to be described as being a truecolor format is:
Ans  : 24

Ques : In a 3-D graphics environment, the process of subdividing a surface into a mesh of smaller shapes that are easy to analyze is known as:
Ans  : Tessellation

Ques : Which of the following types of reflection transmits light in all direction with the same energy?
Ans  : Diffuse

Ques : Which of the following vector graphics editors used to process digital graphics is/are open source, instead of being proprietary?
Ans  : Inkscape

Ques : The rendering of three-dimensional computer graphics often employs one or more  approaches to model a complex four-dimensional mathematical function that defines the  physical behavior of light at an opaque surface. This fundamental radiometric concept is known as the:
Ans  :  Bidirectional reflectance distribution function (BRDF)

Ques : What is meant by the term auto trace?
Ans  : A programmed function in illustration software that converts raster graphics into vector graphics whereby paths are created along the edges of a scanned image.

Ques : Which one of the following formats would provide the least amount of pixelation when its dimensions are scaled (magnified) in size?
Ans  : JPEG

Ques :  What is meant by the term stroke?
Ans  : A term that illustration software uses to describe the width of a line in a path.

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab

UpWork (oDesk) & Elance Oracle PL Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Oracle PL Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is extremely valuable to acquire knowledge of Oracle PL. Lets Start test.


Ques : The oracle server implicitly opens a cursor to process:
Ans  :  A Sql select statement
       DML Statements

Ques : Which two among the following programming constructs can be grouped within a package?
Ans  : Constant
       Sequence

Ques : Which two statements, among the following, describe the state of a package variable after executing the package in which it is declared?
Ans  : It persists across transactions within a session
       It persists from session to session for the same user

Ques : Which of the following is not a legal declaration?
Ans  : declare x,y varchar2(10);
      declare Sex boolean:=1;
 
Ques : Which two statements out of the following regarding packages are true?
Ans  : The package specification is required, but the package body is optional
       The specification and body of the package are stored separately in the database
 
Ques : A table has to be dropped from within a stored procedure. How can this be implemented
Ans  : Use the DBMS_DDL packaged routines in the procedure to drop the table

Ques : CREATE OR REPLACE PACKAGE manage_emp IS
tax_rate CONSTANT NUMBER(5,2) := .28;
v_id NUMBER;
PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER);
PROCEDURE delete_emp;
PROCEDURE update_emp;
FUNCTION cal_tax (p_sal NUMBER) RETURN NUMBER;
END manage_emp;
/
CREATE OR REPLACE PACKAGE BODY manage_emp IS

PROCEDURE update_sal (p_raise_amt NUMBER) IS
BEGIN
UPDATE emp SET sal = (sal * p_raise_emt) + sal
WHERE empno = v_id;
END;

PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER) IS
BEGIN
INSERT INTO emp(empno, deptno, sal) VALUES
(v_id, p_depntno, p_sal);
END insert_emp;

PROCEDURE delete_emp IS
BEGIN
DELETE FROM emp WHERE empno = v_id;
END delete_emp;

PROCEDURE update_emp IS
v_sal NUMBER(10,2);
v_raise NUMBER(10, 2);
BEGIN
SELECT sal INTO v_sal FROM emp WHERE empno = v_id;
IF v_sal < 500 THEN v_raise := .05;
ELSIP v_sal < 1000 THEN v_raise := .07;
ELSE v_raise := .04;
END IF;
update_sal(v_raise);
END update_emp;

FUNCTION cal_tax (p_sal NUMBER)RETURN NUMBER IS
BEGIN
RETURN p_sal * tax_rate;
END cal_tax;
END manage_emp;
/
What is the name of the private procedure in this package?
Ans  : UPDATE_SAL

Ques : An internal LOB is _____.
Ans  : Stored in the database

Ques : The technique employed by the Oracle engine to protect table data, when several people are accessing it is called:
Ans  :  Concurrency Control

Ques : Which table should be queried to determine when the procedure was last compiled?
Ans  : USER_OBJECTS

Ques : Which cursor dynamically allows passing values to a cursor while opening another cursor?
Ans  : Implicit Cursor

Ques : Which precomplied word is called, which when encountered, immediately binds the numbered exception handler to a name?
Ans  : Exception_init

Ques : How can migration be done from a LONG to a LOB data type for a column?
Ans  : Using ALTER TABLE statement

Ques : Which table and column can be queried to see all procedures and functions that have been marked invalid?
Ans  : USER_OBJECTS table,STATUS column

Ques : In which type of trigger can the OLD and NEW qualifiers can be used?
Ans  : Row level DML trigger

Ques : Examine the following trigger:

CREATE OR REPLACE TRIGGER Emp_count
AFTER DELETE ON Employee
FOR EACH ROW
DECLARE
n INTEGER;
BEGIN
SELECT COUNT(*) INTO n FROM employee;
DMBS_OUTPUT.PUT_LINE( 'There are now' || n || 'employees');
END;

This trigger results in an error after this SQL statement is entered: DELETE FROM Employee WHERE Empno = 7499;
How should the error be corrected?
Ans  : Take out the COUNT function because it is not allowed in a trigger

Ques : Which Section deals with handling of errors that arise during execution of the data manipulation statements, which makeup the PL/SQL Block?
Ans  : Exception

Ques :  Which of the following statements is true?
Ans  :  Stored functions can increase the efficiency of queries by performing functions in the query rather than in the application

Ques :Examine the following code:
CREATE OR REPLACE FUNCTION gen_email (first_name VARCHAR2, last_name VARCHAR2,
id NUMBER)
RETURN VARCHAR2 IS
email_name VARCHAR2(19);
BEGIN
email_name := SUBSTR(first_name, 1, 1) ||
SUBSTR(last_name, 1, 7) ||.@Oracle.com .;
UPDATE employees SET email = email_name
WHERE employee_id = id;
RETURN email_name;
END;
Which of the following statements removes the function?
Ans  : DROP FUNCTION gen_email;

Ques : In Pl/Sql, if the where clause evaluates to a set of data, which lock is used?
Ans  :  Page Level lock

Ques : If user defined error condition exists,Which of the following statements made a call to that exception?
Ans  : Raise

Ques : Which of the following are identified by the "INSTEAD OF" clause in a trigger?
Ans  : The view associated with the trigger

Ques : What type of trigger is created on the EMP table that monitors every row that is changed, and places this information into the AUDIT_TABLE?
Ans  : FOR EACH ROW trigger on the EMP table

Ques : Which procedure is called after a row has been fetched to transfer the value, from the select list of the cursor into a local variable?
Ans  :  Row_value

Ques : What is the maximum number of handlers processed before the PL/SQL block is exited, when an exception occurs?
Ans  : Only one

Ques : When the procedure or function is invoked, the Oracle engine loads the compiled procedure or function in the memory area called:
Ans  : PGA

Ques : What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations?
Ans  : The area of memory established to process the SQL statement is released

Ques : Examine the following package specification:
CREATE OR REPLACE PACKAGE combine_all
IS
v_string VARCHAR2(100);
PROCEDURE combine (p_num_val NUMBER);
PROCEDURE combine (p_date_val DATE);
PROCEDURE combine (p_char_val VARCHAR2, p_num_val NUMBER);
END combine_all;
/
Which overloaded COMBINE procedure declaration can be added to this package specification?
Ans  :  PROCEDURE combine;

Ques : Which part of a database trigger determines the number of times the trigger body executes?
Ans  : Trigger type

Ques : Which table should be queried to check the status of a function?
Ans  : USER_OBJECTS

Ques : Which of the following statements is true regarding stored procedures?
Ans  :  A stored procedure must have at least one executable statement in the procedure body

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER secure_emp
BEFORE LOGON ON employees
BEGIN
IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR
(TO_CHAR(SYSDATE, 'HH24:MI')
NOT BETWEEN '08:00' AND '18:00')
THEN RAISE_APPLICATION_ERROR (-20500, 'You may
insert into the EMPLOYEES table only during
business hours.');
END IF;
END;
/
What type of trigger is it?
Ans  : This is an invalid trigger

Ques : Which code is stored in the database when a procedure or function is created in SQL*PLUS?
Ans  : Only P-CODE

Ques : Evaluate the following PL/SQL block:
DECLARE
v_low   NUMBER:=2;
v_upp   NUMBER:=100;
v_count NUMBER:=1;
BEGIN
FOR i IN v_low..v_low LOOP
INSERT INTO test(results)
VALUES (v_count)
v_count:=v_count+1;
END LOOP;
END;
How many times will the executable statements inside the FOR LOOP execute?
Ans  : 1

Ques : What can be done with the DBMS_LOB package?
Ans  : Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER UPD_SALARY
FOR EACH ROW
BEGIN
UPDATE TEAM
SET SALARY=SALARY+:NEW.SALARY
WHERE ID=:NEW.TEAM_ID
END;
Which statement must be added to make this trigger executable after updating the SALARY column of the PLAYER table?
Ans  : AFTER UPDATE ON PLAYER

Ques : Examine the following code:

CREATE OR REPLACE PACKAGE comm_package IS
g_comm NUMBER := 10;
PROCEDURE reset_comm(p_comm IN NUMBER);
END comm_package;

User MILLER executes the following code at 9:01am:
EXECUTE comm_package.g_comm := 15

User Smith executes the following code at 9:05am:
EXECUTE comm_package.g_comm := 20

Which of the following statement is true?
Ans  :  g_comm has a value of 15 at 9:06am for Miller

Ques : The CHECK_SAL procedure calls the UPD_SAL procedure. Both procedures are INVALID.Which command can be issued to recompile both procedures?
Ans  : ALTER PROCEDURE CHECK_SAL compile

Ques : Examine the following procedure:
PROCEDURE emp_salary
(v_bonus  BOOLEAN,
V_raise BOOLEAN,
V_issue_check in out BOOEAN)
is
BEGIN
v_issue_check:=v_bonus or v_raise;
END;
If v_bonus=TRUE and v_raise=NULL,which value is assigned to v_issue_check?
Ans  : TRUE

Ques : Which package construct must be declared and defined within the packages body?
Ans  :  Private Procedure

Ques : What happens when rows are found using a FETCH statement?
Ans  : The current row values are loaded into variables

Ques : Evaluate the following PL/SQL block:
DECLARE
result BOOLEAN;
BEGIN
DELETE FROM EMPloyee
WHERE dept_id IN (10,40,50);
result:=SQL%ISOPEN;
COMMIT:
END;

What will be the value of RESULT if three rows are deleted?
Ans  : FALSE

Ques : Which two statements among the following, regarding oracle database 10g PL/SQL support for LOB migration, are true?
Ans  : Standard package functions accept LOBs as parameters

Ques : Which command is used to disable all triggers on the EMPLOYEES table?
Ans  : ALTER TABLE employees DISABLE ALL TRIGGERS;

Ques : SQL%ISOPEN always evaluates to false in case of a/an:
Ans  : Implicit Cursor

Ques : Which datatype does the cursor attribute '%ISOPEN' return?
Ans  : BOOLEAN

Ques : Which of the following is a benefit of using procedures and functions?
Ans  : Procedures and Function avoid reparsing for multiple users by exploiting shared SQL areas

Ques : All packages can be recompiled by using an Oracle utility called:
Ans  :  Dbms_utility

Ques : Which type of variable should be used to assign the value TRUE, FALSE?
Ans  : Scalar

Ques : Examine the following code:
CREATE OR REPLACE TRIGGER update_emp
AFTER UPDATE ON emp
BEGIN
INSERT INTO audit_table (who, dated) VALUES (USER, SYSDATE);
END;
/
An UPDATE command is issued in the EMP table that results in changing 10 rows
How many rows are inserted into the AUDIT_TABLE ?
Ans  : 1

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techniques, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays ARSBD oEtab ARSBD-JOBS DesignerTab