GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

What statement is actually compiled if we use following prep…

What statement is actually compiled if we use following preprocessor directives? #define SCORE 3 + 4 int value = SCORE * 15;

Read Details

Which of the following statements are true about this array…

Which of the following statements are true about this array traversal code? int array[ 4 ] = { 35, 17, 28, 15 };int x; for( x = 0; x < 24; x++ ) {   printf( "%d\n", array[ x ] ); }

Read Details

Assume the name of your executable is myprogram. Which of th…

Assume the name of your executable is myprogram. Which of the following commands will execute the program?

Read Details

Predict the Output: printf(“%d”, sizeof(5.0)); printf(“%d”,…

Predict the Output: printf(“%d”, sizeof(5.0)); printf(“%d”, sizeof(5)); Explain what is printed and why? Consider the code is fully formed, i.e., no excuses like missing main(), missing stdio.h, etc.

Read Details

What happens if you enter 10 and then dd in Command mode in…

What happens if you enter 10 and then dd in Command mode in vim?

Read Details

Given two matrices (2-D array) of elements, implement a logi…

Given two matrices (2-D array) of elements, implement a logic to print the difference of the matrix. Hint: It’s not subtraction. I’m asking for difference, hence no negative values in result. Concentrate on your array logic, variables, and printf() statements. Assume the array is already declared and defined, and is of size SIZExSIZE. int array[][] = {{row of elements}, {row of elements}, … , {row of elements}}; Sample output: For example if array1[][] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; array2[][] = {{9, 8, 7}, {6, 5, 4}, {3, 2, 1}}; The difference of the matrix is: 8 6 4 2 0 2 4 6 8

Read Details

Predict the Output: int a = 10;if (a = 0)    printf(“Hello”)…

Predict the Output: int a = 10;if (a = 0)    printf(“Hello”);else    printf(“World”); Explain what is printed and why? Consider the code is fully formed, i.e., no excuses like missing main(), missing stdio.h, etc.

Read Details

Given an array of elements, implement a logic to print the s…

Given an array of elements, implement a logic to print the second largest number without sorting. Concentrate on your array logic, variables, and printf() statements. Assume the array is already declared and defined, and is of size SIZE. int array[] = {some elements} Sample output: For example, if array[] = {23, 34, 45, 56, 67, 78}; The second largest element in the array is: 67

Read Details

Predict the Output: printf(“%d”, printf(“Hi”)); Explain what…

Predict the Output: printf(“%d”, printf(“Hi”)); Explain what is printed and why? Consider the code is fully formed, i.e., no excuses like missing main(), missing stdio.h, etc.

Read Details

Predict the Output: int a = 5, b = 2;printf(“%d”, a / b); Ex…

Predict the Output: int a = 5, b = 2;printf(“%d”, a / b); Explain what is printed and why? Consider the code is fully formed, i.e., no excuses like missing main(), missing stdio.h, etc.    

Read Details

Posts pagination

Newer posts 1 … 38 39 40 41 42 … 79,318 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top