logo

Crowdly

Browser

Add to Chrome

Course 31709

Looking for Course 31709 test answers and solutions? Browse our comprehensive collection of verified answers for Course 31709 at lms.aub.edu.lb.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

What is the correct way to declare a constant pointer to an integer in C++?

0%
0%
100%
0%
View this question

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

0%
0%
100%
0%
View this question

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%
View this question

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

0%
0%
0%
100%
View this question

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

0%
0%
0%
100%
View this question

typedef struct Student

{

int rollno;

int total;

} Student;

Student s1;

struct Student s2;

Which statement is correct?

View this question

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?

View this question

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));

}

View this question

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?

View this question

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

View this question

Want instant access to all verified answers on lms.aub.edu.lb?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome