GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

What is the output of the following code?  int tailFact(int…

What is the output of the following code?  int tailFact(int n, int acc) { if (n == 0) return acc; return tailFact(n – 1, n * acc); } printf(“%d”, tailFact(4, 1));

Read Details

What is the output of the following code?  char* fruit[3] =…

What is the output of the following code?  char* fruit[3] = {“Apple”, “Pear”, “Orange”}; printf(“%c”, fruit[2][3]);

Read Details

What is the output of the following code?  void printCount(i…

What is the output of the following code?  void printCount(int n) { if (n == 0) return; printf(“%d “, n); printCount(n – 1); } printCount(3);

Read Details

What is the output of the following code?  char fruit[3][7]…

What is the output of the following code?  char fruit[3][7] = {“Apple”, “Pear”, “Orange”}; printf(“%c”, fruit[1][2]);

Read Details

How many bytes are read assuming file.bin has at least 16 by…

How many bytes are read assuming file.bin has at least 16 bytes?  FILE *fp = fopen(“file.bin”, “rb”); char buf[4]; size_t n = fread(buf, 1, 4, fp); printf(“%zu”, n); fclose(fp);

Read Details

What is wrong with this code?  struct Student { char name[50…

What is wrong with this code?  struct Student { char name[50]; int age; }; Student s1;

Read Details

What is the output of the following code?  printf(“%d”, size…

What is the output of the following code?  printf(“%d”, sizeof(char) – strlen(“sidewalk”));

Read Details

What is the output of the following code?  char str1[] = “He…

What is the output of the following code?  char str1[] = “Hello”; char str2[] = “hello”; printf(“%d”, strcmp(str1, str2));

Read Details

What is the output of the following code?  struct Point { in…

What is the output of the following code?  struct Point { int x, y; }; struct Point points[2] = {{10, 20}, {30, 40}}; struct Point *p = points; printf(“%d”, (p+1)->x);

Read Details

What is the output of the following code?  int nums[3][3] =…

What is the output of the following code?  int nums[3][3] = {{10, 20, 30}, {40, 50, 60}, {70, 80, 90}}; printf(“nums[1][2] = %d *(* (nums + 1) + 2) = %d\n”, nums[1][2], *(*(nums + 1) + 2));

Read Details

Posts pagination

Newer posts 1 … 37,359 37,360 37,361 37,362 37,363 … 94,801 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top