Skip to content

Tag Archives: Operators

Predict the output of following C program #include <stdio.h> int main() {     int i = 0;     do     {         printf("GeeqsQuiz ");         i = i++;     }     while… Read More
What does the following statement do? x  = x | 1 << n; (A) Sets x as 2n (B) Sets (n+1)th bit of x (C)… Read More
In C, two integers can be swapped using minimum (A) 0 extra variable (B) 1 extra variable (C) 2 extra variable (D) 4 extra variable… Read More
Which of the following can have different meaning in different contexts? (A) & (B) * (C) Both of the above (D) There are no such… Read More
Predict the output of the below program: #include <stdio.h> int main() {     printf("%d", 1 << 2 + 3 << 4);     return 0; } (A) 112… Read More
Predict the output of following program. Assume that the characters are represented using ASCII Values. #include <stdio.h> #define VAL 32     int main() {     char… Read More
Which of the following is not a logical operator?  (A) &&   (B) !   (C) ||   (D) |   Answer: (D)Explanation: &&– Logical AND !– Logical NOT ||– Logical… Read More
#include<stdio.h>  int main(void)  {    int a = 1;    int b = 0;    b = a++ + a++;    printf("%d %d",a,b);    return 0;  } (A) 3 6… Read More
#include<stdio.h>  int main()  {    char *s[] = { "knowledge","is","power"};    char **p;    p = s;    printf("%s ", ++*p);    printf("%s ", *p++);    printf("%s ", ++*p);         return… Read More
#include <stdio.h>  int main()  {    int a = 10, b = 20, c = 30;    if (c > b > a)      printf("TRUE");    else     printf("FALSE");    return… Read More
What is the output of following program? #include <stdio.h>    int main() {    int a = 1;    int b = 1;    int c = a… Read More
Output of following program? #include <stdio.h> int f1() { printf ("Geeks"); return 1;} int f2() { printf ("Quiz"); return 1;}    int main() {   int… Read More
#include <stdio.h> int main() {     //Assume sizeof character is 1 byte and sizeof integer is 4 bytes     printf("%d", sizeof(printf("GeeksQuiz")));     return 0; } (A) GeeksQuiz4 (B)… Read More
#include <stdio.h> int main() {     int i = 5, j = 10, k = 15;     printf("%d ", sizeof(k /= i + j));     printf("%d", k);     return… Read More
What is the output of below program? #include <stdio.h> int foo(int* a, int* b) {     int sum = *a + *b;     *b = *a;     return… Read More

Start Your Coding Journey Now!