TPEC4

TPEC4

Professional Development

15 Qs

quiz-placeholder

Similar activities

Datatypes and Flowcontrol

Datatypes and Flowcontrol

Professional Development

15 Qs

Elearn, Emails, Netiquette

Elearn, Emails, Netiquette

Professional Development

10 Qs

วิชาการเขียนโปรแกรมภาษา Pyhton รหัส 32201

วิชาการเขียนโปรแกรมภาษา Pyhton รหัส 32201

Professional Development

20 Qs

Quality Day 22 Oct 2021

Quality Day 22 Oct 2021

Professional Development

10 Qs

gta san adres

gta san adres

KG - Professional Development

10 Qs

CSS Quiz 2

CSS Quiz 2

University - Professional Development

10 Qs

Mapeamento e Normalização BD

Mapeamento e Normalização BD

University - Professional Development

15 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

TPEC4

TPEC4

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Revathy BD

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the result of the following code snippet?

#include <stdio.h>

void solve()

{

char ch[10] = "abcdefghij";

int ans = 0;

for(int i = 0; i < 10; i++)

{

ans += (ch[i] - 'a');

}

printf("%d", ans);

}

int main()

{

solve();

return 0;

}

45

35

20

100

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

#include "stdio.h"

int main()

{

int x, y = 5, z = 5;

x = y == z;

printf("%d", x);

getchar();

return 0;

}

0

1

5

Compiler Error

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt


How is an array initialized in C language?


int a = {1, 2, 3};

int a(3) = [1, 2, 3];

int a[] = new int[3];

int a[3] = {1, 2, 3};

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How is the 3rd element in an array accessed based on pointer notation?


*(a + 3)

*a + 3

&(a + 3)

(a + 3)

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt


How to find the length of an array in C?

sizeof(a[0])

sizeof(a) / sizeof(a[0])

sizeof(a) * sizeof(a[0])

sizeof(a)

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code snippet?

#include <stdio.h>

#include<stdlib.h>

void set(int to)

{

to = (int)malloc(5 sizeof(int));

}

void solve()

{

int ptr; set(ptr); ptr = 10;

printf("%d", ptr);

}

int main()

{

solve();

return 0;

}

10

The program may crash.

Cannot Say

Garbage Value

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

From following which is not the operation of data structure?

Operations that manipulate data in some way

Operations that perform a computation

Operations that check for syntax errors

Operations that check for syntax errors

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?