Challenging C Programming Concepts

Challenging C Programming Concepts

University

20 Qs

quiz-placeholder

Similar activities

Coding club Summit Online Quiz

Coding club Summit Online Quiz

University

15 Qs

OCS752_CP_WEEKLY_TEST3 (20.08.2020)

OCS752_CP_WEEKLY_TEST3 (20.08.2020)

University

20 Qs

Fundamentals of data Structures & Linked list

Fundamentals of data Structures & Linked list

University

20 Qs

Soal Java

Soal Java

11th Grade - University

15 Qs

Quiz on Air Pool 1 SH

Quiz on Air Pool 1 SH

University

21 Qs

Java Array

Java Array

University

23 Qs

OPC MCQ's

OPC MCQ's

12th Grade - University

20 Qs

Technical Quiz

Technical Quiz

University

20 Qs

Challenging C Programming Concepts

Challenging C Programming Concepts

Assessment

Quiz

Computers

University

Medium

Created by

REVATHI R

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code: int a = 10; int *p = &a; printf('%d', *p);?

20

*p

10

10.0

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following correctly allocates memory for an array of 10 integers?

int array(10);

int array[10];

int array[] = new int[10];

int[10] array;

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the result of the expression: sizeof(arr) / sizeof(arr[0]) if arr is an array of integers?

total memory allocated for arr

size of the array in bytes

size of the first element in bytes

number of elements in arr

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you declare a pointer to a function that takes an int and returns void?

void pointerName(int);

int *pointerName(void);

void (*pointerName)(int);

void (*pointerName)(void);

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the 'free' function in C?

To allocate memory on the stack.

To deallocate memory previously allocated on the heap.

To read data from a file.

To initialize variables in C.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following statements correctly initializes a string in C?

char* str = "Hello, World!";

string str = "Hello, World!";

char str = 'Hello, World!';

char* str = Hello, World!;

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code: char str[] = 'Hello'; printf('%c', str[1]);?

e

H

l

o

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?