Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

4/19/24, 3:10 PM Global Quest Technologies CSR Drive-2024-3

Global Quest Technologies CSR Drive-


2024-3
deveshpathak67@gmail.com Switch accounts

Your email address will be recorded when you submit this form

* Indicates required question

C Programming

Which of the following is not a valid way to initialize an array in C? *

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

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

int arr[5] = {1};

int arr[5] = {0};

What is the output of the following code snippet? *

printf("%d", sizeof(float));

It depends on the system

https://docs.google.com/forms/d/e/1FAIpQLScDdNYqs4wa6In1bGLmsL33Z9SJmdlvuhAoZwrfJKWtrvrGTw/formResponse 1/5
4/19/24, 3:10 PM Global Quest Technologies CSR Drive-2024-3

In C, how do you access the elements of an array? *

Using parentheses

Using square brackets

Using curly braces

Using angle brackets

What is the result of the expression `sizeof(1.5)` in C? *

It depends on the system

What is the purpose of the `#include` directive in C? *

To include a function definition

To include a header file

To comment out code

To define a macro

https://docs.google.com/forms/d/e/1FAIpQLScDdNYqs4wa6In1bGLmsL33Z9SJmdlvuhAoZwrfJKWtrvrGTw/formResponse 2/5
4/19/24, 3:10 PM Global Quest Technologies CSR Drive-2024-3

What is the output of the following code snippet? *

int x = 10;

if (x > 5)

printf("x is greater than 5");

else

printf("x is not greater than 5");

x is greater than 5

x is not greater than 5

The code will not compile

Undefined behavior

In C, how do you declare a constant? *

const x;

constant x;

const int x;

int constant x;

What is the purpose of the `do...while` loop in C? *

To execute a block of code while a condition is true

To execute a block of code at least once

To iterate over an array

To repeat a block of code a specific number of times

https://docs.google.com/forms/d/e/1FAIpQLScDdNYqs4wa6In1bGLmsL33Z9SJmdlvuhAoZwrfJKWtrvrGTw/formResponse 3/5
4/19/24, 3:10 PM Global Quest Technologies CSR Drive-2024-3

What is the purpose of the `void` keyword in a function declaration? *

To specify that the function returns no value

To indicate that the function accepts no arguments

To declare a generic function

To define a function as a void data type

Which operator is used for logical AND in C? *

&&

||

&

Back Next Clear form

Never submit passwords through Google Forms.

This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy

Forms

https://docs.google.com/forms/d/e/1FAIpQLScDdNYqs4wa6In1bGLmsL33Z9SJmdlvuhAoZwrfJKWtrvrGTw/formResponse 4/5
4/19/24, 3:10 PM Global Quest Technologies CSR Drive-2024-3

https://docs.google.com/forms/d/e/1FAIpQLScDdNYqs4wa6In1bGLmsL33Z9SJmdlvuhAoZwrfJKWtrvrGTw/formResponse 5/5

You might also like