Search Header Logo

Embedded Systems Domain Proficiency Test-II

Authored by Shaik Imam

Engineering

University

Used 23+ times

Embedded Systems Domain  Proficiency  Test-II
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to concatenate two strings in C using macros?

#define CONCAT(a, b) a + b

#define CONCAT(a, b) a , b

#define CONCAT(a, b) a ## b

#define CONCAT(a, b) a || b

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In dynamic memory allocation, what does the sizeof() operator determine?

Size of the allocated block

Size of the data type

Size of the pointer

Size of the structure

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, the main function can take command line arguments. What is the prototype of such a main function?

int main(int argc , char *argv)

void main(int argc, char *argv[])

void main(char* args[])

int main(char* arguments)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the second command line argument in C?

argv[1]

argv[2]

argc[1]

args[2]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the memset() function do in C?

Copies memory block

Moves memory block

Sets memory block with a constant value

Allocates memory block

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of bitfields in C structures?

To define character arrays

To represent integer values using fewer bits

To create bit-wise operators

To create bit-wise operators

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the code below?

#define SQUARE(x) x * x

int main() {
    int result = SQUARE(3 + 2);
    printf("%d\n", result);
    return 0;
}

25

14

11

Compiler Error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?