SAP Labs Scholar Mock Test-4

28 Likes 2 Comments

Hey shouters!! Today we have come up with the SAP Labs Scholar Mock test paper to give you a preview of the online test of Scholar@SAP.

0
Created on By useruser

Sap Labs Scholar MCQ Test-4

1 / 15

Preemptive Shortest Job First scheduling is sometimes called ____________

2 / 15

What will be the output of the following JavaScript code?

int a=4;int b=1;int c=0;If(a==b)    document.write(a);else if(a==c)    document.write(a);else    document.write(c);

3 / 15

The name of the script is stored in which special parameter?

4 / 15

Triggers are supported in

5 / 15

(SELECT course idFROM SECTIONWHERE semester = ’Fall’ AND YEAR= 2009)EXCEPT(SELECT course idFROM SECTIONWHERE semester = ’Spring’ AND YEAR= 2010);

This query displays

6 / 15

What is the output of following function for start pointing to first node of following linked list?

1->2->3->4->5->6void fun(struct node* start){    if(start == NULL)    return;    printf("%d  ", start->data);     if(start->next != NULL )    fun(start->next->next);    printf("%d  ", start->data);}

7 / 15

What will be the output of the following Java code snippet?

import java.util.*;
class LinkedList
{
public static void main(String args[])
{
LinkedList obj = new LinkedList();
obj.add("A");
obj.add("B");
obj.add("C");
obj.addFirst("D");
System.out.println(obj);
}
}

8 / 15

The essential condition which is checked before deletion in a linked queue is?

9 / 15

What will be the output of the following Java program?

class Abc
{
public static void main(String[]args)
{
String[] elements = { "for", "tea", "too" };
String first = (elements.length > 0) ? elements[0]: null;
}
}

10 / 15

What will be the output of the following Java program?

class Alligator
{
public static void main(String[] args)
{
int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
int [][]y = x;
System.out.println(y[2][1]);
}
}

11 / 15

What will be the output of the following C code?

#include <stdio.h>
int main()
{
char *a = {"p", "r", "o", "g", "r", "a", "m"};
printf("%s", a);
}

12 / 15

C Questions and Answers – DMA Functions, Memory Leak, Dangling Pointers – 2

« 
 »

This set of C Interview Questions and Answers focuses on “DMA Functions, Memory Leak, Dangling Pointers – 2”.

1. What will be the output of the following C code if it is executed on a 32 bit processor?

advertisement
#include<stdio.h>#include<stdlib.h>int main(){    int *p;    p = (int *)malloc(20);    printf("%d\n", sizeof(p));    free(p);    return 0;}

13 / 15

What will be the output of the following C code?

#include <stdio.h>
int main()
{
int i = 0;
do
{
i++;
if (i == 2)
continue;
printf("In while loop ");
} while (i < 2);
printf("%d\n", i);
}

14 / 15

What will be the output of the following C code?

#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
}

15 / 15

What will the following C code do?

char * strrchr(const char *s, int c )
char ch = c;
char *sc;
for(sc = NULL; ; ++s)
if(*s == ch)
SC = 9;
i f (*s =='\O' )
return (( char *) s);

Your score is

The average score is 0%

0%

You might like

Avatar

About the Author: Akshay sharma

Hey Shouters!!. I am the CEO of Shoutcoders.com. I have completed the Electronics and Communication Engineering from Guru Nanak Dev University, Amritsar, Punjab. I Cleared TCS Codevita with a rank of 5,035. Got a Job Offer from TCS, India through it. Also, Got Job offer from SAP Labs, India as a Scholar. I will be joining soon. The aim of our website is to provide programming knowledge in simplest way.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami