Company: Qualcomm Software engineering Oncampus_15july
Difficulty: medium
What does the program shown below print when it runs? #include int main() { int a = 3, b = 5, c = 12; int *pa = &a, *pb = &b, *pc = &c; a +=! (--*pa + *pb) && ++ *pc; *pc += (!++*pa) || *pb++; printf("%d %d %d", a, b, c); return 0; }
Which of the listed tools is responsible for turning assembly-language source code into an object program?
The snippet below may contain a logical mistake. Spot the issue, if any, and state how you would correct it. #include int main() { int x = 5; int y = 0; int z = x / y; printf("The result is: %d\n", z); return 0; }
What does the program below output? #include int main(void) { char a = 4; char b = 2; char c = 1; printf("%d ", -a / b); printf("%d ", -c % -b); return 0; }
Consider the doubly linked list shown here: Head -> A X Y B -> Null Operations: Create a new node P and update its previous (left) pointer as NULL and next (right) pointer to point to the current head node. Update the 3rd node's next (right) pointer to point to node B, and node B's previous (left) pointer to point to node X. Create a new node M and update its previous (left) pointer to point to no
For a sorted array of n elements, what running time does binary search take to locate a key?
Which snippet correctly fills the blank below so that the function computes the product of two 2D matrices? int mul() { int A[n][p], B[p][m], C[n][m]; for (int i = 0; i < n; i++) for (int k = 0; k < m; k++) { Sum = 0; ______________ } return C; }
What is the hexadecimal equivalent of this binary number? 1101110
Which option below shows the correctly simplified form of the expression given? B'D + BC'D + C'D