Coder's Clan(Developer Recruit - Round 1)

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Codersclan
C
Codersclan
Community Contributor
Quizzes Created: 1 | Total Attempts: 153
Questions: 30 | Attempts: 153

SettingsSettingsSettings
Coders Clan(Developer Recruit - Round 1) - Quiz


Questions and Answers
  • 1. 

    What is the correct value to return to the operating system upon successful completion of a program in c?

    • A.

      0

    • B.

      1

    • C.

      -1

    • D.

      Program do not return a value

    Correct Answer
    A. 0
    Explanation
    In the C programming language, the correct value to return to the operating system upon successful completion of a program is 0. This convention is followed to indicate that the program executed successfully without any errors or issues. By returning 0, it signifies that the program completed its execution as expected and can be considered a successful termination.

    Rate this question:

  • 2. 

    What will be the output after execution of following code?#include<stdio.h>#include<stdlib.h>int main(){char ch;int i;ch='G';i=ch-'A';printf("%d",i);}

    • A.

      8

    • B.

      7

    • C.

      6

    • D.

      5

    • E.

      Error

    Correct Answer
    C. 6
    Explanation
    The code is written in C and it is trying to find the difference between the ASCII values of the characters 'G' and 'A'. In ASCII, the value of 'G' is 71 and the value of 'A' is 65. Therefore, the difference between them is 6. The code then prints the value of 'i', which is 6.

    Rate this question:

  • 3. 

    What is the output of following code in c?#include#includeint main(){int i=0678;printf("%d",i);return 0;}

    • A.

      0678

    • B.

      678

    • C.

      Compilation error

    • D.

      Runtime error

    Correct Answer
    C. Compilation error
    Explanation
    The code will produce a compilation error because the number 0678 is an invalid octal number. In C, octal numbers must start with a leading zero followed by valid octal digits (0-7). Since 8 is not a valid octal digit, the code will fail to compile.

    Rate this question:

  • 4. 

    "My salary was increased 15%"Select the statement which will EXACTLY reproduce above line.

    • A.

      Printf("My salary was increased 15%");

    • B.

      Printf("My salary was increased 15\%");

    • C.

      Printf("My salary was increased '15%' ");

    • D.

      Printf("My salary was increased 15%%");

    Correct Answer
    D. Printf("My salary was increased 15%%");
    Explanation
    The correct answer is printf("My salary was increased 15%%"). This statement will exactly reproduce the given line because the double percent sign (%%) is used in printf to print a single percent sign.

    Rate this question:

  • 5. 

    What is the output of following?#include <stdio.h>#include <stdlib.h>int main() {     char str[] = "Smaller";    int a = 100;    printf(a > 10 ? "Greater" : "%s", str);    return 0;}

    • A.

      Greater

    • B.

      Smaller

    • C.

      100

    • D.

      Compilation error

    Correct Answer
    A. Greater
    Explanation
    The output of the code is "Greater". This is because the printf statement uses a ternary operator to check if the value of 'a' is greater than 10. Since 'a' is equal to 100, which is greater than 10, the ternary operator evaluates to true and the printf statement prints "Greater".

    Rate this question:

  • 6. 

    How many times below for loop will run?#include<stdio.h>int main(){int i=0;for(;;){printf("%d",i++);}return 0;}

    • A.

      0 times

    • B.

      Infinite times

    • C.

      1 time

    • D.

      Generates error

    Correct Answer
    B. Infinite times
    Explanation
    The for loop in the given code does not have any condition specified in the second part of the loop declaration. As a result, the loop will continue to run indefinitely until it is terminated manually. Therefore, the for loop will run infinite times.

    Rate this question:

  • 7. 

    What is the output of following?#include#includeint main(){int i=1;printf("%d%d%d",i++,i,++i);return 0;}

    • A.

      124

    • B.

      Compiler dependent

    • C.

      223

    • D.

      233

    Correct Answer
    B. Compiler dependent
    Explanation
    The output of this program is compiler dependent because the order of evaluation of the arguments in the printf statement is not defined. Different compilers may choose to evaluate the arguments in a different order, leading to different results. In this case, the arguments are i++, i, and ++i. Depending on the compiler, the order of evaluation could be 1, 2, 3 or 2, 2, 3. Therefore, the output could be either 124 or 223.

    Rate this question:

  • 8. 

    Guess the output. #include<stdio.h>int main(){    int a = 100, b = 200, c = 300;    if(!a >= 500)        b = 300;    c = 400;    printf("%d,%d,%d",a, b, c);    return 0;}

    • A.

      100,200,300

    • B.

      100,200,400

    • C.

      100,300,400

    • D.

      100,300,300

    Correct Answer
    B. 100,200,400
    Explanation
    The output of the program will be "100,200,400". This is because the condition in the if statement is false, as the value of "a" is 100 which is not greater than or equal to 500. Therefore, the statement inside the if block is not executed, and the values of "b" and "c" remain unchanged. The printf statement then prints the values of "a", "b", and "c", which are 100, 200, and 400 respectively.

    Rate this question:

  • 9. 

    What is the output of following? #include<stdio.h> void main(){   int i = 1;   while(i++<=5);       printf("%d ",i);}

    • A.

      7

    • B.

      6

    • C.

      5

    • D.

      4

    Correct Answer
    A. 7
    Explanation
    The output of the given code is 7. This is because the while loop condition is i++

    Rate this question:

  • 10. 

    Linker generate _________ file?

    • A.

      Object code

    • B.

      Assembly code

    • C.

      Executable code

    • D.

      None of above

    Correct Answer
    C. Executable code
    Explanation
    The linker generates the executable code file. The linker is responsible for combining object code files, generated by the compiler, into a single executable file. This executable file contains the machine code that can be directly executed by the computer's processor. The linker resolves any unresolved symbols and addresses in the object code files, ensuring that all the necessary functions and variables are correctly linked together. Therefore, the correct answer is "Executable code".

    Rate this question:

  • 11. 

    Which of the following is not a keyword in java?

    • A.

      Static

    • B.

      Boolean

    • C.

      Void

    • D.

      Private

    Correct Answer
    B. Boolean
    Explanation
    The keyword "Boolean" is not a keyword in Java. In Java, the keyword "boolean" (with a lowercase 'b') is used to declare a boolean variable, which can only have the values true or false. However, "Boolean" (with an uppercase 'B') is a wrapper class in Java that is used to wrap the primitive type boolean into an object. It provides methods for converting boolean values to strings and vice versa.

    Rate this question:

  • 12. 

    What is the size of byte variable?

    • A.

      8 bit

    • B.

      16 bit

    • C.

      32 bit

    • D.

      64 bit

    Correct Answer
    A. 8 bit
    Explanation
    A byte variable is typically 8 bits in size. This means it can store a range of values from 0 to 255. It is the smallest unit of memory allocation in most programming languages and is commonly used to represent small integers or character data.

    Rate this question:

  • 13. 

    What is static block?

    • A.

      It is used to create syncronized code.

    • B.

      There is no such block.

    • C.

      It is used to initialize the static data member and It is excuted before main method at the time of class loading.

    • D.

      None of the above.

    Correct Answer
    C. It is used to initialize the static data member and It is excuted before main method at the time of class loading.
    Explanation
    A static block is a block of code that is used to initialize static data members. It is executed before the main method at the time of class loading. This allows the static data members to be initialized before any other code is executed in the class. This is useful for setting up any necessary initial values or configurations for the static data members.

    Rate this question:

  • 14. 

    What happens when thread's sleep() method is called?

    • A.

      Thread returns to the ready state.

    • B.

      Thread returns to the waiting state.

    • C.

      Thread starts running.

    • D.

      None of the above.

    Correct Answer
    B. Thread returns to the waiting state.
    Explanation
    When a thread's sleep() method is called, the thread enters a waiting state. It temporarily suspends its execution for the specified amount of time, allowing other threads to execute. Once the sleep duration is over, the thread moves back to the ready state and can be scheduled by the operating system to run again. Therefore, the correct answer is that the thread returns to the waiting state.

    Rate this question:

  • 15. 

    Which method of the Runnable interface that must be implemented by all threads?

    • A.

      Run()

    • B.

      Start()

    • C.

      Sleep()

    • D.

      Wait()

    Correct Answer
    A. Run()
    Explanation
    All threads must implement the run() method of the Runnable interface. This method contains the code that will be executed when the thread is started. The start() method is used to start a thread, sleep() is used to pause the execution of a thread for a specified amount of time, and wait() is used for thread synchronization. However, only the run() method is mandatory for all threads.

    Rate this question:

  • 16. 

    Specify the directory name where the XML layout files are stored in android.

    • A.

      /assets

    • B.

      /src

    • C.

      /values

    • D.

      None of the Above

    Correct Answer
    D. None of the Above
  • 17. 

    Can We inflate multiple layout or fragment on the same screen?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Yes, we can inflate multiple layouts or fragments on the same screen in Android. This can be achieved by using ViewGroup containers such as LinearLayout, RelativeLayout, or FrameLayout, which allow multiple child views to be added and displayed simultaneously. By adding multiple layouts or fragments within these containers, we can create complex and dynamic user interfaces with multiple components displayed on the same screen.

    Rate this question:

  • 18. 

    Which Build System/Tool is used to Build APK in Android Studio?

    • A.

      Gradle

    • B.

      Ant

    • C.

      Maven

    • D.

      Ansible

    Correct Answer
    A. Gradle
    Explanation
    Gradle is the build system/tool used to build APK files in Android Studio. Gradle is a powerful and flexible build automation tool that allows developers to define and customize their build process. It offers a rich set of features and plugins specifically designed for Android development, making it the preferred choice for building Android applications. Gradle simplifies the build process by managing dependencies, compiling code, and packaging resources into the final APK file. It also supports incremental builds and provides efficient caching mechanisms, resulting in faster build times.

    Rate this question:

  • 19. 

    What is wrap_content Layout parameter.

    • A.

      View wants to be as big as its parent (minus padding)

    • B.

      View wants to be just big enough to enclose its content (plus padding)

    • C.

      Both (A) and (B)

    • D.

      None of the Above

    Correct Answer
    B. View wants to be just big enough to enclose its content (plus padding)
    Explanation
    The wrap_content layout parameter specifies that the view should be sized just enough to enclose its content, including any padding. This means that the view will adjust its size dynamically based on the size of its content, ensuring that it is not larger than necessary. The padding is also taken into account when determining the size of the view.

    Rate this question:

  • 20. 

    Which database is Serverless and mostly used for Stand-alone Devices?

    • A.

      MySql

    • B.

      SQLite

    • C.

      MongoDB

    • D.

      None of the Above

    Correct Answer
    B. SQLite
    Explanation
    SQLite is a serverless database that is mostly used for stand-alone devices. It is a self-contained, file-based database that does not require a separate server process to function. SQLite is widely used in embedded systems and mobile applications where there is a need for a lightweight and efficient database solution. It is a popular choice for devices with limited resources and where there is no need for a centralized server. Therefore, SQLite is the correct answer for this question.

    Rate this question:

  • 21. 

    Who is known as father of pHP ?

    • A.

      Charles Reym

    • B.

      Rasmus Lerdraf

    • C.

      Prof. Thales

    • D.

      Louis Pasture

    Correct Answer
    B. Rasmus Lerdraf
    Explanation
    Rasmus Lerdraf is known as the father of PHP. He created the PHP programming language in 1994 while he was a student at the University of Helsinki. Lerdraf originally developed PHP as a set of tools to manage his personal website, but it quickly gained popularity and evolved into a widely used scripting language for web development. Lerdraf's contributions to PHP have had a significant impact on the internet and have made him widely recognized as the father of PHP.

    Rate this question:

  • 22. 

    How a variable declared in pHP ?

    • A.

      $varname=$value;

    • B.

      Varname=value;

    • C.

      $varname=value;

    • D.

      None of These

    Correct Answer
    C. $varname=value;
    Explanation
    The correct answer is $varname=value; because in PHP, variables are declared by using the dollar sign ($) followed by the variable name, then an equal sign (=) and finally the value assigned to the variable. This syntax is used to assign a value to a variable in PHP. The other options provided in the question are incorrect as they either miss the dollar sign or use incorrect capitalization.

    Rate this question:

  • 23. 

    What will the following script output?<?php$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);$sum = 0;for ($i = 0; $i < 5; $i++) {$sum += $array[$array[$i]];}echo $sum;?>

    • A.

      78

    • B.

      19

    • C.

      Null

    • D.

      5

    Correct Answer
    A. 78
    Explanation
    The script will output 78. The script initializes an array with numbers from 1 to 55. It then goes through a loop 5 times, adding the value of the element at the index given by the value of the current element to the sum. In this case, the values being added are $array[1], $array[2], $array[3], $array[5], and $array[8], which are 2, 3, 5, 13, and 55 respectively. The sum of these values is 78, which is then echoed.

    Rate this question:

  • 24. 

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

    • A.

      Mysqlconnect() function

    • B.

      Mysql-connect() function

    • C.

      Mysql_connect() function

    • D.

      Sql_connect() function

    Correct Answer
    C. 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 to connect to the MySQL server. Once the connection is established, you can perform various operations such as querying the database and manipulating data.

    Rate this question:

  • 25. 

    The ............. statement is used to delete a table.

    • A.

      Drop Table

    • B.

      Delete Table

    • C.

      Del table

    • D.

      Remove Table

    Correct Answer
    A. Drop Table
    Explanation
    The correct answer is "Drop Table". This statement is used to delete a table in a database. By using the "Drop Table" command, the entire table and all its associated data and indexes are permanently removed from the database. It is a commonly used command in SQL to remove unwanted tables from the database schema.

    Rate this question:

  • 26. 

    Which tag is used to print  a line on your web page?

    • A.

      Br tag

    • B.

      Hr tag

    • C.

      Line tag

    • D.

      All the above

    Correct Answer
    B. Hr tag
    Explanation
    The correct answer is the hr tag. The hr tag is used to create a horizontal line on a web page. This tag is often used to separate content or sections on a page. The br tag is used to create a line break, not a horizontal line. The line tag is not a valid HTML tag. Therefore, the correct answer is the hr tag.

    Rate this question:

  • 27. 

    How to make each word in a sentence start with a capital letter?

    • A.

      Font-weight:bold

    • B.

      Text-transform:uppercase

    • C.

      Text-transform:capitalize

    • D.

      Font-size:100px

    Correct Answer
    C. Text-transform:capitalize
    Explanation
    The correct answer is "text-transform:capitalize" because this CSS property transforms the text to capitalize the first letter of each word in a sentence. This means that every word will start with a capital letter, while the rest of the letters remain lowercase. This is the appropriate property to use when you want to ensure consistent capitalization for each word in a sentence.

    Rate this question:

  • 28. 

    Which css property is used to change the color of text in html?

    • A.

      Fgcolor

    • B.

      Font-color

    • C.

      Text-color

    • D.

      Color

    Correct Answer
    D. Color
    Explanation
    The correct answer is "color". This CSS property is used to change the color of text in HTML. It allows developers to specify the desired color using various formats such as color names, hexadecimal values, RGB values, or HSL values. By using the "color" property, the text color can be customized to match the desired design or style of the webpage.

    Rate this question:

  • 29. 

    What is the full name of CSS ?

    • A.

      Cascading Sheet Style

    • B.

      Cascading Style Sheet

    • C.

      Castcading Style Sheet

    • D.

      Control Style Sheet

    Correct Answer
    B. Cascading Style Sheet
    Explanation
    CSS stands for Cascading Style Sheet. It is a style sheet language used for describing the look and formatting of a document written in HTML or XML. CSS allows web designers to control the presentation of web pages, including layout, colors, fonts, and other visual aspects. The correct answer is "Cascading Style Sheet".

    Rate this question:

  • 30. 

    Which of the following is the extension used for external css property?

    • A.

      .js

    • B.

      .cs

    • C.

      .style

    • D.

      .css

    Correct Answer
    D. .css
    Explanation
    The correct answer is ".css" because it is the file extension commonly used for external CSS (Cascading Style Sheets) files. CSS files are used to define the styling and layout of a webpage, and they can be linked to HTML documents using the tag in the section of the HTML document. By using the .css extension, it is easier for web developers to identify and manage their CSS files separately from other types of files in a project.

    Rate this question:

Quiz Review Timeline +

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

  • Current Version
  • Mar 17, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 04, 2017
    Quiz Created by
    Codersclan
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.