GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Consider the following piece of C/C++ code inside a file: ex…

Consider the following piece of C/C++ code inside a file: extern int var1;float var2 = 3.14159;void f1 (float var3) {    int *var4;     // …other commands} The following are correct statements regarding the C/C++ statements above, except:

Read Details

The following function receives a pointer to an float array…

The following function receives a pointer to an float array void setValue(float * q) { Mention the condition(s) that must be checked inside the function before the pointer is used.

Read Details

Write a for-loop to print all integer numbers between 39 to…

Write a for-loop to print all integer numbers between 39 to 57, while preventing out of bound errors:

Read Details

The following line correctly declares an array that will hol…

The following line correctly declares an array that will hold 12 integer numbers:

Read Details

Consider the following piece of C/C++ code: int a = 4, b = 5…

Consider the following piece of C/C++ code: int a = 4, b = 5, c = 3;int *p = &a , *q = &c ;*q *= (*p)*b; The value of the variable c after the previous code is executed will be:

Read Details

Consider the following piece of C/C++ code inside a file: ex…

Consider the following piece of C/C++ code inside a file: extern int var1 = 7;float var2 = 1.4142;void f1 (float var3) {    float *var4 = &var3;     // …other commands} The following are correct statements regarding the C/C++ statements above, except:

Read Details

The following function receives a pointer to an integer arra…

The following function receives a pointer to an integer array void getValue(int * p) { Mention the condition(s) that must be checked inside the function before the pointer is used.

Read Details

What is wrong with this C/C++ switch command? switch(a) { i…

What is wrong with this C/C++ switch command? switch(a) { int b = 3; case 1: case 2: printf(“b is bigger than a\n”); break; case 3: case 4: case 5: printf(“a is bigger than b\n”); break; default: printf(“a is bigger than b\n”); break; }

Read Details

An ASCII file is opened for reading in a C/C++ program with…

An ASCII file is opened for reading in a C/C++ program with g as its FILE The file contains many lines with two decimal numbers in each. Both numbers are aligned within columns of 15 characters each. Write a line of code that will read the double variable &number1 and the double variable &number2 from a line in the file.

Read Details

Consider the following piece of C/C++ code: int a[5] = { 14…

Consider the following piece of C/C++ code: int a[5] = { 14 };int *p = &a;for (int i=1;i

Read Details

Posts pagination

Newer posts 1 … 45,520 45,521 45,522 45,523 45,524 … 68,382 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top