logo

Crowdly

Browser

Додати до Chrome

Course 31709

Шукаєте відповіді та рішення тестів для Course 31709? Перегляньте нашу велику колекцію перевірених відповідей для Course 31709 в lms.aub.edu.lb.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

How to release the memory allocated by a pointer in C++?

0%
0%
100%
0%
Переглянути це питання

What does the following C++ code do?

#include<iostream>

using namespace std;

int main() {

int *ptr = NULL;

ptr = new int;

*ptr = 7;

cout << *ptr;

delete ptr;

return 0;

}

0%
0%
0%
100%
Переглянути це питання

How do you dynamically allocate memory for an array in C++ using pointers?

0%
0%
0%
100%
Переглянути це питання

What is the correct way to dynamically create an object in C++?

0%
0%
0%
100%
Переглянути це питання

typedef struct Student

{

int rollno;

int total;

} Student;

Student s1;

struct Student s2;

Which statement is correct?

Переглянути це питання

Consider the following three C functions:

[PI] int * g (void)

{

int x= 10;

return (&x);

}

[P2] int * g (void)

{

int * px;

*px= 10;

return px;

}

[P3] int *g (void)

{

int *px;

px = (int *) malloc (sizeof(int));

*px= 10;

return px;

}

Which of the above functions are likely to cause problems with pointers?

Переглянути це питання

Consider the following program. Where are i, j and *k stored in memory?

int i;

int main()

{

int j;

int *k = (int *) malloc (sizeof(int));

}

Переглянути це питання

int main() {

char p[]="geeksquiz";

char t;

int i,j;

for(i=0,j=strlen(p);i!=j;i++,j--)

{

t=p[i];

p[i]=p[j-i];

p[j-i]=t;

}

printf("%s",p);

return 0;

}

Output?

Переглянути це питання

The most appropriate matching for the following pairs (GATE CS 2000)

Переглянути це питання

What is returned by malloc() if the allocation fail?

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на lms.aub.edu.lb?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome