GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

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

What is the value of i after this for loop? int i; for( i =…

What is the value of i after this for loop? int i; for( i = 10; i > 0; i– ) { }

Read Details

In Linux, what is the command to full path of your current w…

In Linux, what is the command to full path of your current working directory?

Read Details

Posts pagination

Newer posts 1 … 48 49 50 51 52 … 79,327 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top