Code_athon & Stack Designer

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Namansaksham
N
Namansaksham
Community Contributor
Quizzes Created: 1 | Total Attempts: 100
| Attempts: 100
SettingsSettings
Please wait...
  • 1/60 Questions

    Outlook Express is a _________

    • E-Mail Client
    • Browser
    • Search Engine
    • None of the above
Please wait...
About This Quiz

The 'CODE_ATHON & STACK DESIGNER' quiz assesses knowledge in C programming, focusing on functions, pointers, and bitwise operations. It is designed to challenge and enhance understanding of core programming concepts, suitable for learners aiming to improve their coding skills.

Code_athon & Stack Designer - Quiz

Quiz Preview

  • 2. 

    What is a FTP program used for?

    • Transfer files to and from an Internet Server

    • Designing a website

    • Connecting to the internet

    • None of the above

    Correct Answer
    A. Transfer files to and from an Internet Server
    Explanation
    An FTP program is used to transfer files to and from an Internet server. This allows users to upload files from their local computer to a remote server, as well as download files from the server to their computer. It provides a convenient and efficient way to manage and transfer files over the internet. Designing a website and connecting to the internet are not specific functions of an FTP program.

    Rate this question:

  • 3. 

    How can we take input text from user in HTML page?

    • input tag

    • InoutBufferedReader tag

    • Meta tag

    • scanner tag

    Correct Answer
    A. input tag
    Explanation
    The input tag in HTML is used to create an input field where users can enter text. It allows users to input various types of data such as text, numbers, dates, etc. By using the input tag, developers can easily take input text from users on an HTML page.

    Rate this question:

  • 4. 

    What does the .com domain represents?

    • Education domain

    • Commercial domain

    • Network

    • None of the above

    Correct Answer
    A. Commercial domain
    Explanation
    The .com domain represents the commercial domain. This is because the .com extension is primarily used by businesses and commercial organizations to establish their online presence. It is the most common and widely recognized top-level domain for commercial websites.

    Rate this question:

  • 5. 

    Which of the following is correct HTML for inserting an image?

    • <image source= “www.swalasksha.com/admin.jpg” alt= “This is me” />

    •  <img source= “http://www.swalasksha.com/admin.jpg” alt= “This is me” />

    •  <img src= “www.swalasksha.com/admin.jpg” alt= “This is me” />

    • <img alt= “This is me”>www.swalasksha.com/admin.jpg

    Correct Answer
    A.  <img src= “www.swalasksha.com/admin.jpg” alt= “This is me” />
    Explanation
    The correct HTML for inserting an image is "". This is because the "img" tag is used to insert an image in HTML, and the "src" attribute specifies the source or URL of the image file. The "alt" attribute is used to provide alternative text for the image, which is displayed if the image cannot be loaded or for accessibility purposes.

    Rate this question:

  • 6. 

    In pHP in order to access MySQL database you will use:

    • Mysqlconnect() function

    • Mysql-connect() function

    • Mysql_connect() function

    • Sql_connect() function

    Correct Answer
    A. Mysql_connect() function
    Explanation
    The correct answer is mysql_connect() function. This function is used in PHP to establish a connection with a MySQL database. It takes parameters such as the server name, username, password, and database name, and returns a connection object that can be used to execute SQL queries and perform database operations.

    Rate this question:

  • 7. 

    Servlet are used to program which component in a web application?

    • Client

    • server

    • Tomcat

    • applet

    Correct Answer
    A. server
    Explanation
    Servlets are used to program the server component in a web application. They are Java classes that run on a web server and handle requests and responses from clients. Servlets are responsible for processing user input, interacting with databases, and generating dynamic web content. They are an essential part of server-side programming in web development.

    Rate this question:

  • 8. 

    The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is

    • 284

    • 213

    • 142

    • 71

    Correct Answer
    A. 142
    Explanation
    The given postfix expression can be evaluated as follows:
    - Start by evaluating the sum of 10 and 5, which is 15.
    - Then, evaluate the division of 60 by 6, which is 10.
    - Next, multiply the previous result (10) by 10, resulting in 100.
    - Finally, subtract 8 from the previous result (100), resulting in 92.
    Therefore, the correct answer is 92. However, the given answer of 142 is incorrect.

    Rate this question:

  • 9. 

    Once the email is sent, the message is broken into pieces called ………………

    • Packets

    • Process

    • Digits

    • Bytes

    Correct Answer
    A. Packets
    Explanation
    When an email is sent, the message is divided into smaller units called packets. These packets contain a portion of the message along with the necessary information to route them through the network. This division into packets allows for efficient transmission of data over the internet, as each packet can take a different route and be reassembled at the destination. Therefore, the correct answer is "Packets".

    Rate this question:

  • 10. 

    Which of the following is the correct way for writing Java Script array?

    • Var salaries = new Array(1:39438, 2:39839 3:83729)

    • var salaries = new (Array1=39438, Array 2=39839 Array 3=83729)

    • var salaries = new Array(39438, 39839,83729)

    • Var salaries = new Array() values = 39438, 39839 83729

    Correct Answer
    A. var salaries = new Array(39438, 39839,83729)
    Explanation
    The correct way to write a JavaScript array is by using the syntax: var salaries = new Array(39438, 39839,83729). This syntax creates a new array object called "salaries" with three elements: 39438, 39839, and 83729.

    Rate this question:

  • 11. 

    Which of the following is valid IP address?

    • 984.12.787.76

    • 192.168.321.10

    • 1.888.234.3456

    • 192.168.56.115

    Correct Answer
    A. 192.168.56.115
    Explanation
    The given IP address, 192.168.56.115, is a valid IP address because it follows the standard format of four sets of numbers separated by periods. Each set of numbers should range from 0 to 255, which is the valid range for an IP address.

    Rate this question:

  • 12. 

    What does MIME stand for?

    • Multipurpose Internet Messaging Extension

    • Multipurpose Internet Mail Extension

    • Multipurpose Internet Media Extension

    • Multipurpose Internet Mass Extension

    Correct Answer
    A. Multipurpose Internet Mail Extension
    Explanation
    MIME stands for Multipurpose Internet Mail Extension. This is a protocol that allows email clients to exchange different types of data, such as text, images, audio, and video. It enhances the capabilities of the basic Internet email system by enabling the transmission of multimedia content. The correct answer is "Multipurpose Internet Mail Extension".

    Rate this question:

  • 13. 

    What is the similarity between a structure, union and enumeration?

    • All of them let you define new values

    • All of them let you define new data types

    • All of them let you define new pointers

    • All of them let you define new structures

    Correct Answer
    A. All of them let you define new data types
    Explanation
    The similarity between a structure, union, and enumeration is that all of them allow you to define new data types. Structures allow you to group related variables together, unions allow you to store different types of data in the same memory space, and enumerations allow you to define a set of named values. These data types can then be used to create variables and manipulate data in a more organized and meaningful way.

    Rate this question:

  • 14. 

    What does the following statement do? x = x | 1 << n;

    • Set x as 2

    • Set (n+1)th bit of x

    • Toggles (n+1)th bit of x

    • UnSet (n+1)th bit of x

    Correct Answer
    A. Set (n+1)th bit of x
    Explanation
    The given statement sets the (n+1)th bit of x to 1. It uses the bitwise OR operator (|) and the left shift operator (

    Rate this question:

  • 15. 

    How can we get the number of records or rows in a table?

    • Using COUNT

    • Using NUM

    • Using NUMBER

    • Both COUNT and NUMBER

    Correct Answer
    A. Using COUNT
    Explanation
    To get the number of records or rows in a table, we can use the COUNT function. This function allows us to count the number of rows in a specified table. By using the COUNT function, we can easily retrieve the total number of records present in the table.

    Rate this question:

  • 16. 

    Which of the following defines 1% of viewport height?

    • Px

    • Vh

    • Vw

    • vmin

    Correct Answer
    A. Vh
    Explanation
    The correct answer is "vh", which stands for viewport height. Viewport height refers to a percentage of the height of the browser window. So when we say 1% of viewport height, it means that it is 1% of the total height of the browser window.

    Rate this question:

  • 17. 

    What does vlink attribute mean?

    • Visited link

    • virtual link

    • Very good link

    • active link

    Correct Answer
    A. Visited link
    Explanation
    The vlink attribute refers to a visited link. This attribute is used in HTML to specify the color of a link that has been visited by the user. When a user clicks on a link and visits the corresponding web page, the vlink attribute allows the web developer to define a specific color for that visited link. This helps the user to easily identify which links they have already visited on a website.

    Rate this question:

  • 18. 

    How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.

    • 1

    • 2

    • 3

    • 4

    Correct Answer
    A. 2
    Explanation
    To implement a queue using stacks, we need two stacks. The first stack is used to enqueue elements, where we push elements into it. The second stack is used to dequeue elements, where we pop elements from it. By using two stacks, we can simulate the FIFO (First-In-First-Out) behavior of a queue. When we need to enqueue an element, we push it into the first stack. When we need to dequeue an element, we check if the second stack is empty. If it is empty, we transfer all the elements from the first stack to the second stack in reverse order. Then we pop the top element from the second stack, which gives us the element that was first enqueued.

    Rate this question:

  • 19. 

    The "father" of MySQL is

    • Bill Joy

    • Stephanie Wall

    • Sigmund Velin

    • Michael Widenius

    Correct Answer
    A. Michael Widenius
    Explanation
    Michael Widenius is considered the "father" of MySQL because he was one of the original developers of the open-source database management system. Along with his partner David Axmark, Widenius created MySQL in the 1990s while working for a Swedish company called TcX. He played a crucial role in designing and developing the early versions of MySQL, which eventually became one of the most popular and widely used database systems in the world. Widenius's contributions to the development and success of MySQL make him the correct answer to this question.

    Rate this question:

  • 20. 

    In which numbering system can the binary number 1011011111000101 be easily converted to?

    • Decimal system

    • Hexadecimal system

    • Octal system

    • No need to convert

    Correct Answer
    A. Hexadecimal system
    Explanation
    The binary number 1011011111000101 can be easily converted to the hexadecimal system because hexadecimal is a base-16 numbering system, which means it uses 16 digits (0-9 and A-F) to represent numbers. Since binary is a base-2 system (only 0 and 1), converting it to hexadecimal simplifies the representation by grouping the binary digits into sets of four and replacing each set with its corresponding hexadecimal digit.

    Rate this question:

  • 21. 

    In which stage the following code  #include<stdio.h>  gets replaced by the contents of the file stdio.h

    • During editing

    • During linking

    • During execution

    • During preprocessing

    Correct Answer
    A. During preprocessing
    Explanation
    During preprocessing, the code undergoes several transformations before it is compiled. One of these transformations is the replacement of the "gets" function with the contents of the file "stdio.h". This is done by the preprocessor, which is a part of the compilation process that handles directives starting with a hash symbol (#). It scans the code for these directives and performs actions based on them, such as including header files like "stdio.h". Therefore, the correct answer is "During preprocessing".

    Rate this question:

  • 22. 

    The year in which HTML was first proposed _______. 

    • 1990

    • 1980

    • 2000

    • 1995

    Correct Answer
    A. 1990
    Explanation
    HTML (Hypertext Markup Language) was first proposed in the year 1990. This means that the concept and initial specifications for HTML were introduced and put forward for consideration in that year. It is important to note that while HTML has evolved and undergone various revisions since its initial proposal, 1990 marks the beginning of its development and the foundation of the language that is widely used for creating web pages today.

    Rate this question:

  • 23. 

    What does HSL stands for?

    • Hue Specified Lightness

    • Hue Spot Lightness

    • Hue Saturation Lightness

    • None of the mentioned

    Correct Answer
    A. Hue Saturation Lightness
    Explanation
    HSL stands for Hue Saturation Lightness. Hue refers to the color itself, Saturation refers to the intensity or purity of the color, and Lightness refers to the brightness or darkness of the color. This color model is often used in computer graphics and image editing software to represent and manipulate colors.

    Rate this question:

  • 24. 

    Valid XML document means (most appropriate)

    • The document has root element.

    • The document contain at least one or more root element

    • The XML document has DTD associated with it and it complies with that DTD

    • Each element must nest inside any enclosing element property

    Correct Answer
    A. The XML document has DTD associated with it and it complies with that DTD
    Explanation
    A valid XML document means that it adheres to the rules and structure defined in its associated DTD (Document Type Definition). The DTD specifies the elements, attributes, and structure that the XML document must follow. Therefore, for a document to be considered valid, it must have a DTD associated with it and comply with the rules defined in that DTD. The other options mentioned in the question, such as having a root element or nesting elements properly, are important aspects of XML documents but do not define its validity.

    Rate this question:

  • 25. 

     Which configuration file in android studio holds the permission to use the internet?

    • Layout file

    • Property file

    • Java source file

    • Manifest file

    Correct Answer
    A. Manifest file
    Explanation
    The correct answer is the Manifest file. The Manifest file in Android Studio holds the permission to use the internet. This file is responsible for declaring the components of an application, such as activities, services, and permissions. By including the appropriate permission in the Manifest file, an application can access the internet and make network requests.

    Rate this question:

  • 26. 

    HTML uses 

    • User defined tags

    • Pre-specified tags

    • Fixed tags defined by the language

    • Tags only for linking

    Correct Answer
    A. Fixed tags defined by the language
    Explanation
    HTML uses fixed tags defined by the language. These tags are predefined and have specific meanings and functions within the HTML language. They are used to structure and format the content of a webpage, such as headings, paragraphs, lists, images, and links. Each tag has a specific syntax and is enclosed in angle brackets. By using these fixed tags, developers can create well-organized and standardized webpages that can be interpreted correctly by web browsers.

    Rate this question:

  • 27. 

    When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?

    • GetElementById

    • GetElementByClassName

    • GetElementByTagName

    • None of the above

    Correct Answer
    A. GetElementById
    Explanation
    When referencing an HTML element preceded by a # (pound or hash), the equivalent JavaScript function is getElementById. This function is used to select an element in the HTML document by its unique ID attribute. It returns the first element that matches the specified ID. The other options, getElementByClassName and getElementByTagName, are not applicable in this case as they are used to select elements based on class names and tag names respectively.

    Rate this question:

  • 28. 

    Predict the output of the below program: #include <stdio.h> #define EVEN 0 #define ODD 1 int main() { int i = 3; switch (i & 1) { case EVEN: printf("Even"); break; case ODD: printf("Odd"); break; default: printf("Default"); } return 0; }

    • Even

    • Odd

    • Default

    • Compile Time Errror

    Correct Answer
    A. Odd
    Explanation
    The program declares two constants, EVEN and ODD, with values 0 and 1 respectively. It then initializes the variable i with a value of 3. The switch statement checks the result of the bitwise AND operation between i and 1. Since 3 AND 1 is equal to 1, the case ODD is selected. Therefore, the output of the program will be "Odd".

    Rate this question:

  • 29. 

    #include<stdio.h> #define PRINT(i, limit) do \                         { \                             if (i++ < limit) \                             { \                                 printf("Code_athon\n"); \                                 continue; \                             } \                         }while(1)   int main() {     PRINT(0, 3);     return 0; } How many times Code_athon is printed in the above program?

    • 1

    • 3

    • 4

    • Compilation Error

    Correct Answer
    A. Compilation Error
    Explanation
    The correct answer is 4. The PRINT macro is defined with a do-while loop that continues indefinitely (while(1)). Inside the loop, there is a condition (i++ < limit) which increments the value of i and checks if it is still less than the limit. If it is, the loop prints "Code_athon" and continues to the next iteration. Since the limit is set to 3, the loop will execute 4 times (0, 1, 2, 3), printing "Code_athon" each time. Therefore, the answer is 4. There is no compilation error in the program.

    Rate this question:

  • 30. 

    struct node {    int i;    float j; }; struct node *s[10]; The above C declaration define 's' to be

    • An array, each element of which is a pointer to a structure of type node.

    • A structure of 2 fields, each field being a pointer to an array of 10 elements.

    • A structure of 3 fields: an integer, a float, and an array of 10 elements.

    • An array, each element of which is a structure of type node.

    Correct Answer
    A. An array, each element of which is a pointer to a structure of type node.
    Explanation
    The given C declaration defines 's' to be an array, where each element is a pointer to a structure of type node. This means that 's' is an array that can hold multiple pointers, and each pointer points to a structure of type node.

    Rate this question:

  • 31. 

    Output? #include <stdio.h> int main() { int (*ptr)(int ) = fun; (*ptr)(3); return 0; } int fun(int n) { for(;n > 0; n--) printf(" IIMT "); return 0; }

    • IIMT IIMT IIMT

    • IIMT IIMT

    • Compile Time

    • RunTime Error

    Correct Answer
    A. Compile Time
    Explanation
    The given code is trying to declare a function pointer named 'ptr' and initialize it with the function 'fun'. However, the function 'fun' is defined after the declaration of the function pointer, which results in a compile-time error. This is because the compiler needs to know the prototype of the function before it is used. Therefore, the code will not compile successfully.

    Rate this question:

  • 32. 

    Which of the following statements correct about the below code? maruti.engine.bolts=25;

    • Structure bolts is nested within structure engine.

    • Structure engine is nested within structure maruti.

    • Structure maruti is nested within structure engine.

    • Structure maruti is nested within structure bolts.

    Correct Answer
    A. Structure engine is nested within structure maruti.
    Explanation
    The given code is assigning a value of 25 to the "bolts" variable within the "engine" structure, which implies that the "bolts" variable is nested within the "engine" structure. Since the code is accessing the "bolts" variable through the "maruti" structure (maruti.engine.bolts), it can be inferred that the "engine" structure is nested within the "maruti" structure. Therefore, the correct statement is "Structure engine is nested within structure maruti."

    Rate this question:

  • 33. 

    Assume that an integer and a pointer each takes 4 bytes. Also, assume that there is no alignment in objects. Predict the output following program. #include<iostream.h> using namespace std; class Test { static int x; int *ptr; int y; }; int main() { Test t; cout << sizeof(t) << " "; cout << sizeof(Test *); }

    • 12 4

    • 12 12

    • 8 4

    • 8 8

    Correct Answer
    A. 8 4
    Explanation
    The output of the program is "8 4". The size of the object 't' of class Test is 8 bytes because it contains an integer 'x' (4 bytes), a pointer 'ptr' (4 bytes), and an integer 'y' (4 bytes). The size of a pointer to the Test class is 4 bytes because a pointer always takes the same amount of memory regardless of the type it is pointing to.

    Rate this question:

  • 34. 

    What is the output of following program? #include<stdio.h>   int main() {    int a = 1;    int b = 1;    int c = a || --b;    int d = a-- && --b;    printf("a = %d, b = %d, c = %d, d = %d", a, b, c, d);    return 0; }

    • a = 0, b = 1, c = 1, d = 0

    • A = 0, b = 0, c = 1, d = 0

    • A = 1, b = 1, c = 1, d = 1

    • A = 0, b = 0, c = 0, d = 0

    Correct Answer
    A. A = 0, b = 0, c = 1, d = 0
    Explanation
    In this program, the variables a and b are initialized to 1.

    In the line "int c = a || --b;", the logical OR operator (||) is used. Since the left operand (a) is true (non-zero), the right operand (--b) is not evaluated. Therefore, the value of c is 1.

    In the line "int d = a-- && --b;", the logical AND operator (&&) is used. Both the left operand (a--) and the right operand (--b) are evaluated. The value of a-- is 1, but since it is a post-decrement operator, the value of a is then decremented to 0. The value of --b is 0, as b is decremented before the evaluation. Therefore, the value of d is 0.

    Finally, the printf statement prints the values of a, b, c, and d, which are 0, 0, 1, and 0 respectively.

    Rate this question:

  • 35. 

     To create a drop down box in html, which tag will you use?

    • <select>

    • <list>

    • <input type=”dropdown”>

    •  all of above

    Correct Answer
    A. <select>
    Explanation
    The correct answer is . This is because the tag is specifically used to create a drop-down box in HTML. The tag does not exist in HTML, and the is not a valid input type for creating a drop-down box. Therefore, the correct choice is .

    Rate this question:

  • 36. 

    Consider the following recursive function fun(x, y). What is the value of fun(4, 3) int fun(int x, int y) {   if (x == 0)     return y;   return fun(x - 1,  x + y); }  

    • 13

    • 12

    • 9

    • 10

    Correct Answer
    A. 13
    Explanation
    The given recursive function takes two parameters, x and y. If x is equal to 0, the function returns the value of y. Otherwise, it recursively calls itself with the parameters x-1 and x+y.

    In the case of fun(4, 3), the function will not return y immediately because x is not equal to 0. It will instead call itself with the parameters 3 and 7 (4-1 and 4+3).

    Again, the function will not return y immediately because x is still not equal to 0. It will call itself with the parameters 2 and 10 (3-1 and 3+7).

    This process continues until x becomes 0. When x becomes 0, the function will return the value of y, which is 13. Therefore, the value of fun(4, 3) is 13.

    Rate this question:

  • 37. 

     What is the meaning of using extern before function declaration? For example following function sum is made extern extern int sum(int x, int y, int z) { return (x + y + z); }

    • Function is Made globally available

    • Extern means nothing , sum() is same without extern

    • Function need not be declared before its use

    • Function is made local to the file

    Correct Answer
    A. Extern means nothing , sum() is same without extern
    Explanation
    The use of "extern" before a function declaration means that the function is made globally available. It allows the function to be accessed and used by other files or modules in the program. In this case, the function "sum" can be called and used in any part of the program where it is needed. The "extern" keyword ensures that the function is visible and accessible outside of its own file.

    Rate this question:

  • 38. 

    What is the correct jQuery code to set the background color of all p elements to red?

    • $("p").layout("background-color","red");

    • $("p").manipulate("background-color","red");

    • $("p").css("background-color","red");

    • $("p").style("background-color","red");

    Correct Answer
    A. $("p").css("background-color","red");
    Explanation
    The correct jQuery code to set the background color of all p elements to red is $("p").css("background-color","red"). This code selects all p elements using the $("p") selector and then uses the css() method to set the background-color property to red.

    Rate this question:

  • 39. 

    You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?

    • Delete the First Element

    • Insert a new Element as the First Element

    • Delete the last Element of the list

    • Add an Element at the end of the list

    Correct Answer
    A. Delete the last Element of the list
    Explanation
    The operation of deleting the last element of the list is dependent on the length of the linked list. If the linked list has only one element, deleting the last element would result in an empty list. However, if the linked list has more than one element, deleting the last element would require traversing the entire list to reach the second-to-last element and update its next pointer. Therefore, the length of the linked list affects the complexity and feasibility of deleting the last element.

    Rate this question:

  • 40. 

     Which of the below is not a javascript framework for UI?

    • Vaadin

    • AngularJS

    • KendoUI

    • Springcore

    Correct Answer
    A. Springcore
    Explanation
    Vaadin, AngularJS, and KendoUI are all well-known JavaScript frameworks for UI development. However, Springcore is not a JavaScript framework for UI. Springcore is a Java-based framework used for building enterprise-level applications. It provides dependency injection and inversion of control features for Java applications, but it is not specifically designed for UI development in JavaScript.

    Rate this question:

  • 41. 

    Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

    • Insertion Sort

    • Quick Sort

    • Merge Sort

    • Heap Sort

    Correct Answer
    A. Merge Sort
    Explanation
    Merge Sort can be used to sort a random linked list with minimum time complexity because it has a time complexity of O(n log n) in the average and worst case scenarios. This is because Merge Sort divides the linked list into two halves, recursively sorts each half, and then merges the sorted halves back together. This approach ensures that the time complexity remains efficient even for large linked lists. In contrast, Insertion Sort has a time complexity of O(n^2) in the worst case, Quick Sort has a time complexity of O(n^2) in the worst case, and Heap Sort has a time complexity of O(n log n) in the best, average, and worst case scenarios.

    Rate this question:

  • 42. 

    What does the following fragment of C-program print? char c[ ] = "GATE2018"; char *p =c; printf("%s", p + p[3] - p[1]) ;

    • GATE2018

    • E2018

    • 2018

    • 018

    Correct Answer
    A. GATE2018
    Explanation
    The given code fragment prints "GATE2018".


    - The variable "c" is an array of characters initialized with the string "GATE2018".
    - The variable "p" is a pointer to the first character of the array "c".
    - In the printf statement, "p[3]" refers to the character at index 3 of the array "c", which is 'E'.
    - Similarly, "p[1]" refers to the character at index 1 of the array "c", which is 'A'.
    - The expression "p + p[3] - p[1]" evaluates to "p + 'E' - 'A'", which means it moves the pointer "p" by 3 positions.
    - Therefore, when we print "%s" with the modified pointer "p", it prints the string "GATE2018".

    Rate this question:

  • 43. 

     What is the storage capacity of single cookie?

    • 2048 MB

    • 2048 bytes

    • 4095 bytes

    • 4095 MB

    Correct Answer
    A. 4095 bytes
    Explanation
    The correct answer is 4095 bytes. Cookies are small text files that are stored on a user's computer by a website. They are commonly used to store information such as user preferences or login credentials. The storage capacity of a single cookie is limited, and in this case, it is limited to 4095 bytes. This means that the information stored in a single cookie cannot exceed this size.

    Rate this question:

  • 44. 

    In C, what is the meaning of following function prototype with empty parameter list void fun() { /* .... */ }

    • Function can be called without any parameter

    • Function can be called with any number of parameter of an types

    • Function can be called with any number of integer parameter

    • Function can be called with one integer parameter

    Correct Answer
    A. Function can be called with any number of parameter of an types
    Explanation
    The function prototype with an empty parameter list in C means that the function can be called with any number of parameters of any types. This means that the function does not have any specific parameter requirements and can accept any arguments passed to it.

    Rate this question:

  • 45. 

    Which type conversion is NOT accepted?

    • From char to int

    • From float to char pointer

    • From negative int to char

    • From double to char

    Correct Answer
    A. From float to char pointer
    Explanation
    Type conversion from float to char pointer is not accepted because it involves converting a floating-point value to a pointer type, which is not allowed in most programming languages.

    Rate this question:

  • 46. 

    Which of the following protocol is not used in the Internet

    • Telnet

    • WIRL

    • HTTP

    • Gopher

    Correct Answer
    A. WIRL
    Explanation
    The protocol "WIRL" is not used in the Internet. Telnet, HTTP, and Gopher are all protocols that are used in the Internet. Telnet is a network protocol used for remote terminal connections, HTTP is the protocol used for transferring hypertext over the Internet, and Gopher is a protocol used for distributing, searching, and retrieving documents. However, "WIRL" is not a recognized protocol used in the Internet.

    Rate this question:

  • 47. 

    The regional networks are connected to the corporate networks, this is also called as?

    • Backbone

    • LAN COM

    • WAN COM

    • Intranet

    Correct Answer
    A. Backbone
    Explanation
    The regional networks are connected to the corporate networks through a backbone, which refers to a central infrastructure that interconnects different networks. This backbone enables efficient communication and data transfer between the regional and corporate networks. It acts as a high-speed pathway for transmitting data and supporting the overall network infrastructure.

    Rate this question:

  • 48. 

    What will be the output of following program #include <stdio.h> main() { int x,y = 10; x = y * NULL; printf(\"%d\",x); }

    • Error

    • 0

    • 10

    • Garbage value

    Correct Answer
    A. 0
    Explanation
    The program is trying to multiply the variable y by NULL, which is a null pointer constant. In C, when a null pointer constant is used in an arithmetic operation, it is treated as the integer constant 0. Therefore, the result of the multiplication will be 0. The program then prints the value of x, which is 0.

    Rate this question:

  • 49. 

     How can we connect to database in a web application?

    • Oracle sql developer

    • Toad

    • JDBC template

    • Mysql

    Correct Answer
    A. JDBC template
    Explanation
    JDBC template is a commonly used method to connect to a database in a web application. JDBC (Java Database Connectivity) is a Java API that allows Java programs to access and interact with databases. The JDBC template provides a higher level of abstraction and simplifies the process of database connectivity by handling low-level details such as opening and closing database connections, executing SQL queries, and processing query results. It provides a convenient and efficient way to connect to various databases, including Oracle, MySQL, and others.

    Rate this question:

Quiz Review Timeline (Updated): Feb 15, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 15, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 13, 2018
    Quiz Created by
    Namansaksham
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.