News Ticker

Menu

Browsing "Older Posts"

Browsing Category "Programming"

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 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 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

UpWork (oDesk) & Elance Objective-C Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance Objective-C 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 Objective-C. Lets Start test.


Ques : Which of the following is the fastest?
Ans  : Mutex implicit locking

Ques : How do you free an object?
Ans  :  [obj release]

Ques :  What is the isa variable in objects?
Ans  : Object class identification

Ques : What is true regarding C functions inside .m files?
Ans  : They can contain Obj-C code

Ques : What does the following imply?

Worker *ceo = [[Worker alloc] init];
ceo->boss = nil;
Ans  : That the boss instance variable is declared @public

Ques : Can you send messages to nil?
Ans  : Yes

Ques :  In which version of Objective-C did the fast enumeration system appear?
Ans  : 2.0

Ques : What comments are supported in Obj-C?
Ans  :  // Line comments

Ques : What type of variable do you need to use to implement singletons?
Ans  : static

Ques : As categories can't have instance variables, what class could you use to implement a full class only with categories?
Ans  :  NSMutableDictionary

Ques : How do you throw an exception?
Ans  : @throw exception

Ques : What is true regarding strings?
Ans  : Obj-C strings are not of static storage

Ques : How do you include the root "Object" class?
Ans  : It depends on the compiler

Ques : What is true regarding @protected?
Ans  : The instance variable is accessible within the class that declares it and within classes that inherit it

Ques : What is a protocol?
Ans  :  An interface without an implementation

Ques :  Which of the following is incorrect?
Ans  : [AClass release]

Ques : How do you allocate an object?
Ans  : MyClass *obj = [MyClass alloc];

Ques : What will be the output of the following code?

static int
a (void)
{
printf ("a\n");
return 0;
}

static int
b (void)
{
printf ("b\n");
return 1;
}

static int
c (void)
{
printf ("c\n");
return 2;
}

int
main (int argc, const char *argv[])
{
printf ("%d %d %d", a (), b (), c ());
return 0;
}
Ans  : a b c 0 1 2

Ques : What is nil?
Ans  : The null object

Ques : Can an exception caught in @catch be re-thrown?
Ans  : Yes

Ques : What class specifiers are supported?
Ans  : There is no such thing as class specifiers

Ques : Which of the following declares a protocol?
Ans  : @protocol ProtocolName

Ques : What is the Obj-C runtime?
Ans  : A C library

Ques : What's the difference between copy and deepCopy?
Ans  : copy creates a copy at the first level, while deepCopy copies the instance variables

Ques : Which of the following can be inherited?
Ans  : Protocols

Ques : A method can be tagged to be called only by a specific class and its subclasses.
Ans  : False

Ques : Which of the following is not recommended?
Ans  : None of the above

Ques : A class can have two methods with the same name, but with different argument types.
Ans  : False

Ques : What are @try and @catch?
Ans  :  Exception keywords

Ques : A class can conform to only one protocol.
Ans  : False

Ques : Which of the following creates a class that conforms to a protocol?
Ans  : @interface ClassName

Ques : What is the id type?
Ans  :  A generic C type that Objective-C uses for an arbitrary object

Ques : What is a @finally block?
Ans  :  A block of code that is run whenever an exception is thrown or not

Ques : Is the following code a correct allocation?

MyClass myObj;
[&myObj aMessage];
Ans  : No

Ques : What is not supported in Obj-C?
Ans  : Method argument default value

Ques : Which of the following does not happen when you throw an exception in a @synchronized block?
Ans  : The object is deallocated

Ques : What can be linked to an Obj-C program without any particular process?
Ans  : C libraries

Ques : What is the C type used to work with objects in Obj-C?
Ans  : pointer

Ques : What is a category?
Ans  :  A category is a way to add methods to a class which already exists

Ques : Protocols are like classes; they can inherit.
Ans  : True

Ques : Which of the following is false?
Ans  : When a method is called, the send is automatically available as the sender variable, like self or super

Ques : What happens if two categories define methods with the same names for the same class?
Ans  :  At runtime, either method will be called

Ques : What can you do with categories?
Ans  : Add methods to a class without subclassing it

Ques : In which version of Objective-C did the properties system appear?
Ans  :  2.0

Ques : What is the default visibility for instance variables?
Ans  : @protected

Ques : What happens if you release an unretained object twice?
Ans  : MemoryException is raised

Ques : In Obj-C 2.0, what do the fast enumeration protocols rely on to provide fast Enumerations?
Ans  :  C arrays

Ques : What can you use to avoid the msgSend function overhead?
Ans  : SEL

Ques : Which C feature is not supported in Obj-C?
Ans  :  Support is compiler dependant

Ques : What does Obj-C not support?
Ans  : Automatic variables

Ques : When using the garbage collector, which method, that is normally called without the collector, is not called on your objects where they are collected?
Ans  : dealloc

Ques : What can be used as Object instance variables?
Ans  : pointers

Ques : What is a SEL?
Ans  : A pointer to a method

Ques : What is an IMP?
Ans  : The C type of a method implementation pointer

Ques : What is true regarding @public?
Ans  : It breaks encapsulation

Ques : What is an autoreleased object?
Ans  : An object that will be released when the current AutoreleasePool is deallocated.

Ques : If you need to allocate custom memory, in which method will you do so?
Ans  : None of the above

Ques : What is #import
Ans  :  C preprocessor construct to avoid multiple inclusions of the same file

Ques : What is true regarding messaging?
Ans  :  Messaging is fully dynamic, which means you can compile some code that sends a message to a class that doesn't implement it, and add a category later, in a dynamic library for example

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 JSON Test Question & Answers

/ No Comments
UpWork (oDesk) & Elance JSON 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 JSON. Lets Start test.


Ques : Which of the following properties form part of the response to a JSON-RPC method invocation?
Ans  : result + error + id

Ques :  Which of the following methods is/are provided by JSONRequest?
Ans  : get + cancel

Ques : Which of the following parameters can be passed in the JSONRequest.get request?
Ans  : url + done

Ques : Which of the following is/are true with regard to JSONRequest?
Ans  :  It is a two way data interchange between any page and any server + It accumulates random delays before acting on new requests when previous requests have failed.

Ques : Which of the following properties are contained in the request for a JSON-RPC method invocation?
Ans  :  method+ params

Ques : Which of the following statements is/are not correct about the JSON-RPC?
Ans  :  It wraps an object, allowing you to call methods on that object and get the return values. + It allows for bidirectional communication between the service and the client.

Ques : Which of the following parameters can be passed in the JSONRequest.post request?
Ans  :  done+ send

Ques : Which of the following statements is/are true about modules with reference to JSON?
Ans  : Modules cannot have negative CSS margins + The CSS display property of a module must be static.

Ques : Which of the following is a valid JSONPath expression?
Ans  :  $.store.book[0].title

Ques : Which of the following JSONPath elements represents the root object/element?
Ans  : $

Ques : Which of the following parameter values cannot be serialized in JSONRequest?
Ans  : send

Ques : Which of the following correctly describes the term tuple typing in JSON Schema?
Ans  : It provides an enumeration of possible values that are valid for the instance property. It should be an array, and each item in the array should represent a possible value for the instance value.

Ques : Which of the following statements is correct about JSON?
Ans  :  It is a lightweight data interchange format.

Ques : What is the significance of the arrow before the following code in JSON?
--> { "method": "echo", "params": ["Hello JSON-RPC"], "id": 1}
Ans  : It shows the data sent to the service.

Ques : In order to find the authors of all the books in the store, which of the JSONPath codes will you use?
Ans  :  $.store.book[*].author

Ques : What will be the output of the code shown above?
Ans  : OpenDoc 3

Ques : In order to find the price of everything in the store, which of the JSONPath codes will you use?
Ans  : $.store..price

Ques : Which of the following statements correctly describes the following syntax?

{"state":{optional:true},"town":{"required":"state",optional:true}}
Ans  : An instance includes a state property and a town property which is optional.

Ques : Which of the following elements of JSONPath can be used to apply the filter(script) expression?
Ans  : ?()

Ques : State whether true or false.

JSONRequest allows the connection when the Content-Type in both directions is an application/jsonrequest.
Ans  : True

Ques : JSON does not allow you to create an empty object.
Ans  : False

Ques : Which of the following correctly describes the disallow property of the JSON Schema?
Ans  : This attribute may take the same values as the "type" attribute.

Ques : Which of the following correctly describes the function of the JSON.stringify method in JSON?
Ans  :  It converts a JavaScript object into a JSON string.

Ques :  Which of the following properties should be declared first in order to define a schema from an instance?
Ans  :  $schema

Ques : Which of the following schema properties takes schema as value in JSON?
Ans  : extends

Ques : While using JSONRequest.cancel, what will happen to the request if it is still in the outgoing message queue?
Ans  : It will be deleted from the queue.

Ques : What does the [start:end:step] element of JSONPath signify?
Ans  : it represents an array slice operator.

Ques :  Which of the following schema properties does not need to be validated by JSON validators?
Ans  : enum

Ques : Which of the following schema properties always has a unique value for all its instances in JSON?
Ans  : identity

Ques : Which of the following features of JSON has the property of exemption from the same origin policy?
Ans  : JSONRequest

Ques : In the above code snippet, what is the purpose of declaring the JSONRequest.post?
Ans  :  It will queue the request and return the request number.

Ques : Which of the following serialization formats is/are supported by JSON?
Ans  : None of the above

Ques : If a schema property is declared false, which of the following attributes can not be used to extend the schema?
Ans  : additionalProperties

Ques : Which syntax is correct for the jsonPath() function during the implementation of JSONPath?
Ans  : jsonPath(obj, expr [, args])

Ques : In the code snippet below, which line contains an error?

Line1: {
Line2: "id":"person",
Line3: "type":"object",
Line4: "properties":{
Line5: "name":{"type":"string"},
Line6: "age":{"type":"integer"}
Line7: }
Line8: }
Line9: {
Line10:"id":"marriedperson",
Line11: "extends":{"ref":"person"},
Line12: "properties":{
Line13: "age":{"type":"integer",
Line14: "minimum":17},
Line15: }
Line16: }
Ans  : Line 11

Ques : Which of the following correctly describes the JSON Schema?
Ans  :  It is intended to provide validation and interaction control of the JSON data.

Ques : Which of the following parameters of JSONRequest hold/s the information of implicit authentication and cookies during post operation?
Ans  : send

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