1.13. Snippets

  1. Find the output of the following C program. [AMD Jan-2026]
    #include <stdio.h>
    int main()
    {
        int sum = 0, i = 6;
        for (i = 0; i < 6; i++)
        {
            if (i % 2 == 0)
            continue;
            sum += i;
            if (sum > 5)
                 break;
            printf("%u", i);
    }
    printf("|%d %d", i, sum);
    return 0;
    }
  2. Find the output of the following C program. [AMD Jan-2026, Dec-2026]]
    #include <stdio.h>
    int main()
    {
    char s[] = "name";
    char *p = s;
    printf("%c %c %c", *p, *(p + 2), *p - 2);
    return 0;
    }

     

  3. What is the value of 8 >> 3? [AMD Dec-2026]
  4. What is the value of 1 << 3? [AMD Dec-2026]
  5. What is the output? [AMD Dec-2026]
    #include <stdio.h>
    int fun(void)
    {
        static int num = 16;
        return num--;
    }
    int main()
    {
        for (fun(); fun(); fun())
        {
            printf("%d ", fun());
        }
        return 0;
    }
  6. What is the output? [AMD Dec-2026]
    #include <stdio.h>
    #include <stdlib.h>
    int main()
    {
        int *ptr = (int *)malloc(sizeof(int));
        *ptr = 10;
        free(ptr);
        printf("%d", *ptr);
        return 0;
    }
  7. What is the output? [AMD Dec-2026]
    #include <stdio.h>
    int main()
    {
        int x = 10, y = 20;
        int *p1 = &x, *p2 = &y;
        if (p1 > p2)
        {
            printf("P1 is Greater");
        }
        else
        {
            printf("P2 is Greater");
        }
        return 0;
    }
  8. What is the output? [AMD Dec-2026]
    #include <stdio.h>
    void swap(int *x, int *y)
    {
    int temp = *x;
    *x = *y;
    *y = temp;
    }
    int main()
    {
    int a = 10, b = 15;
    swap(&a, &b);
    printf("%d %d", a, b);
    return 0;
    }
  9. From the above macro program, what modifications will you do to get the output as square root value? [AMI Nov-2025]
    #include <stdio.h>
    #define FUN(num) (num * num)
    int main()
    {
    int num = 5;
    printf("%d", FUN(num + 1));
    return 0;
    }
  10. Guess the output and answer accordingly. [AMI Nov-2025]
    #include <stdio.h>
    int main()
    {
    int a = 4, b = 3;
    if (a > b) ? printf("%d", a) : return 1;
    return 0;
    }
  11. Write a program to reverse the binary bits in a given number. [AMI Nov-2025]
  12. What is the output? Where is a stored? How does the compiler know its value? [AMD 11-Feb-2026]
    #include <stdio.h>
    int main()
    {
    int a;
    printf("%d", a++);
    return 0;
    }
  13. What happens during fun() calling? What if I call the function infinite times? In linker stage where is it stored? Draw the data segments. [AMD 11-Feb-2026]
    #include <stdio.h>
    void fun()
    {
    int a;
    printf("%d", a++);
    }
    int main()
    {
    fun();
    return 0;
    }
  14. What happens if the function is called 10 times? What is the variable value every time? What happens if the variable is static? [AMD 11-Feb-2026]
    #include <stdio.h>
    void fun()
    {
    int a = 1;
    printf("%d", a++);
    }
    int main()
    {
    fun();
    return 0;
    }
  15. What is the output? [AMD 11-Feb-2026]
    #include <stdio.h>
    static int a = 5;
    int main()
    {
    static int a = 10;
    printf("%d\n", a);
    return 0;
    }
  16. which header file contains the rand() function in C? * 1 point stdio.h rand.h stdlib.h math.h
  17. What is the output of the following code snippet?int x=0;
    for(int i=0;i<32;i++)
    x+=(1<<i);printf(“%d”,x);
    *
    1 point
    4294967295
    -4294967296
    -1
  18. Consider the following snippet:
    int a=0x ;
    char *c;
    c=&a;
    printf("%x\n",a);
    for(int i=0;i<4;i++)
    printf("%c",*(c+i));
    Assuming Little Endian location, what must be filled in the blank to get the output “ABCD”:*
    1 point
    44434241
    61626364
    64636261
    4142434413)) Suppose I run the following on the linux terminal
    gcc program.c
  19. Which of the following commands executes the code while taking console input from in.txt? * 1 point ./a.out < in.txt ./a.out << in.txt ./a.out in.txt ./a.out -i in.txt
  20. What’s the number closest to the output?
    #include<stdio.h> int main() { int sum =0; for(int i=1;i<1000;i++) { sum += 6*1/(i*i);
    } printf("%d\n",sum); } * 1 point π2 π2 /6 6 7
  21. What is the minimum time complexity required to compute the product of an integer with N digits? * 1 point O(n) 0(n2) O(log2n) O(n log2n)
    16)
    In C++, what is the output of the following code?
    #include<iostream> using namespace std; int main() { int x=34; cout<<(x<<4)<<endl; } * 1 point 344 544 Compilation error None of the above
  22. Arrange operator precedence in decending order1) &-reference 2) &&-logical AND 3) &-bitwise AND
  23. #include<stdio.h>
    int main()
    {
    int x=0;
    for(int i=0; i<32; i++)
    {
    x=x+(1<<i);
    }
    print f("%d",x);
    return 0;
  24. In C++, what is the output of the following code?#include<iostream>
    using namespace std;
    int main()
    {
    int x=34;
    cout<<(x<<4)<<endl;
    }a)344
    b)544
    c)Compilation error
    d)None of the above
  25. What does dynamic programming achieve? a)Improves space complexity and time complexity b)Sacrifices space complexity for time complexity c)Sacrifices time complexity for space complexity d)Sacrifices time complexity and space complexity
  26. Online C compiler to run C program online
    #include <stdio.h>
    int main()
    {
    int x=0;
    for(int i=0;i<32;i++)
    x+=(1<<i);
    printf(“%d”,x);
    }
  27. What is the output of the following code snippets int a=1<<2+1<<2;
    a+=a|a/2;
    a*=(a>a^a/2)?a:a^a/2;
    printf("%d ",a);
  28. #include<stdio.h>
    int main()
    {
    int sum =0;
    for(int i=1;i<1000;i++)
    {
    sum += 6*1/(i*i);}
    printf("%d\n",sum);
    }
  29. What is the output of the following C program? #include<stdio.h> #include<string.h> int main()
    {
    char *str="y";
    char c='y';
    char array[1];
    array[0]=c;
    printf("%d %d ",strlen(str),strlen(array));
    return 0;
    }
    Options :
    2 1
    2 2
    1 (undefined value)
    1 1
  30. .What is the output of the following C program? #include <stdio.h> void myFunction(const int *); int main()
    {
    const int i=20;
    printf("%d",i);
    myFunction(&i);
    printf("%d",i);
    }
    void myFunction(const int *i);
    {
    *i=30;
    }
    Options:
    20 30
    Undefined value
    20
    Compilation error
  31. What is the output of the following C program? #include<stdio.h> void main() {
    int x=3;
    int y=++x + x++ + --x;
    printf("value of y is %d",y);
    }
    Options:
    Undefined value
    Value of y is 12
    Value of y is 13
    Value of y is 10
  32. What is the output of the following C program? #include <stdio.h> int main() {
    int a[4]={1,2,3,4};
    int i;
    for(i=0;i<4;i++)
    if((char)a[i]=='4')
    printf("%d",a[i]);
    else
    printf("FAIL");
    }
    Options:
    The program compiles and displays the ASCII value of 4
    he program compiles and displays 4
    Compiler reports an error
    The program compiles and displays FAIL 4 times
  33. What is the output of the following C program? #include<stdio.h> int main() {
    int a=0;
    a=5||2|1;
    printf("%d",a);
    }
    Options:
    8
    7
    0
    1
  34. What is the output of the following C program? #include <stdio.h> int main() { int a,b,c;
    a=0x10; b=010;
    c=a+b;
    printf("%d",c);
    }
    Options:
    Error
    Garbage
    24
    20
  35. What is the output of the following C program? #include <stdio.h> void solve() {
    int x=2;
    printf("%d",(x<<1)+(x>>1));
    }
    int main()
    {
    solve();
    }
    
    Options:
    1
    4
    5
    2
  36. What will be the output of the following C code? #include <stdio.h> int main() {
    int x=-2;
    x=x>>1;
    printf("%d" ,x);
    }
    
    Options:
    Either -1 or 1
    1
    -1
    2 31 – 1 considering int to be 4 bytes
    }
  37. What is the output of the following code snippets
    #include<stdio.h>
    int main()
    {
    int i;
    for(i=0;i<5;i++)
    {
    if(i>3)
    break;
    printf("%d",i);
    }3.#include<stdio.h>
    int main()
    {
    int i;
    for(i=0;i<5;i++)
    {
    if(i>3)
    continue;
    printf("%d",i);
    }
  38. int main()
    int arr[]={1,2,3,4,5}; *ptr={2,4,5,6}; arr=p; printf("%d%d%d",arr[1],*ptr,*(ptr+1)); }
  39. int main() { int arr[10]={1,2,3,4,5}; int *ptr=arr; printf(“%d”,*(ptr+5)); }
  40. int main() { int arr[]={1,2,3,4,5}; printf(“%d”,arr[5]); }
  41. fun() { static int i=10; printf("%d",i); i++; }
    int main() { fun(); fun(); }
  42. #include<stdio.h> int main() { int a=0x1234; a=a>>12; a=a<<12; printf(“%x”,a); }
  43. #include<stdio.h> int main() { printf("%x",-1); }
    10.#include<stdio.h> int main() { printf("%d",'a'); }
  44. swap(int a,intb) { int temp=a; a=b; b=temp; }
    int main() { int x=2,y=3; swap(x,y); printf("%d%d",x,y); return o; }
  45. find the size of the union union stu { int a; int a[2]; int a[3]; }
  46. #include<stdio.h> void fun(void) { static int i=10; printf(“%d”,i); i++; } int main() { fun(); fun(); }
  47. int main() { int a=0,b=0,c; c=(a=0)?1:2; printf(“%d%d%d”,a,b,c); }
  48. int main() { int a=1,b=2,c=3; int *ptr=&c; a=c/*ptr; b=c; printf(“%d%d”,a,b); }
  49. int main() { int i=3; while(i–) { int i=100; i–; printf(“%d”,i); } return 0; }
  50. #include<stdio.h> int main() { int a=4; switch(a) { case 1:a+=2;break; default:a+=5; case 2:a+=1;break; case 3:a+=3;break; } printf(“%d”,a); }
  51. int main { printf("%d",'a'); }
    options 1- 61 2-a 3-97 4-none
  52. #include<stdio.h>
    auto int X=40;
    int main()
    {
    int X=20;
    printf("%d\n", X);
    return 0;
    }
  53. int main()
    {
    (1>2)?return 1:return 2;
    }
  54. include<stdio.h>
    int main()
    {
    int a[4] = {1,2,3,4};
    int *p=a[3];
    printf("%d,a[*p]);
    return 0;
    }
  55. #include<stdio.h> int main()
    {
    int (*p)() = fun;
    (*p)();
    return 0;
    }
    int fun()
    {
    printf("IndiaBix.com\n");
    return 0;
    }
  56. #include<stdio.h>
    int main()
    {
    int pr=1;
    printf("%d",printf);
    }
  57. include<stdio.h>
    int main()
    {
    int k, num = 30;
    k = (num < 10) ? 100 : 200;
    printf("%d\n", num);
    return 0;
    }
  58. include<stdio.h>
    int main()
    {
    void fun();
    int i = 1;
    while(i <= 5)
    {
    printf("%d\n", i);
    if(i>2)
    goto here;
    }
    return 0;
    }
    void fun()
    {
    here:
    printf("It works");
    }
  59. include<stdio.h>
    int main()
    {
    char ch='a';
    if(ch%10)
    {
    printf("hi");
    }
    else
    printf("hello");
    }
  60. #include<stdio.h>
    int sumdig(int);
    int main()
    {
    int a, b;
    a = sumdig(123);
    b = sumdig(123);
    printf("%d, %d\n", a, b);
    return 0;
    }
    int sumdig(int n)
    {
    int s, d;
    if(n!=0)
    {
    d = n%10;
    n = n/10;
    s = d+sumdig(n);
    }
    else
    return 0;
    return s;
    }
  61. #include<stdio.h>
    int main() { int i; #if A printf("Enter any number:"); scanf("%d", &i); #elif B printf("The number is odd"); return 0; }
  62. #include<stdio.h> #define MAN(x, y) ((x)>(y)) ? (x):(y);
    int main() { int i=10, j=5, k=0; k = MAN(++i, j++); printf("%d, %d, %d\n", i, j, k); return 0; }
  63. #include<stdio.h> #define MAN(x, y) ((x)>(y)) ? (x):(y);
    int main() { int a=2; a>>1; printf("%d",a); return 0; }
  64. #include<stdio.h> #define MAX(a,b) (a * b)
    int main() { int x; x = MAX(3+2, 2+7); printf("%d\n", x); return 0; }
  65. #include<stdio.h> int main() { int *j; void fun(int**); fun(&j); return 0; } void fun(int **k) { int a=10; /* Add a statement here */ }
  66. #include<stdio.h>
    int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1, 2, 13};
    printf("%d, %d, %d\n", bit.bit1, bit.bit3, bit.bit4); return 0; }
  67. #include<stdio.h>
    int main() { struct bits { float f:2; }bit;
    printf("%d\n", sizeof(bit)); return 0; }
  68. #include <stdio.h>
    int main() { // Write C code here int prinf=2; printf("%d",printf); return 0; }
  69. #include <stdio.h>
    int main() { // Write C code here int code [4]={1,2,3,4}; printf("%d",-2[code]); return 0; }
  70. #include <stdio.h>
    int main() { // Write C code here int *ptr="hello"; ptr[2]='i'; printf("c",ptr[i]); return 0; }
  71. #include <stdio.h>
    int main() { // Write C code here char arr[3]={'a','b','c'}; printf("%d",(arr[0]%10)++); return 0; }
  72. #include <stdio.h>
    int main() { // Write C code here unsigned int a=10; printf("%d",~a); return 0; }
  73. #include <stdio.h> #define mul(a,b) a*b int main() { // Write C code here printf(“%d”,mul(1+3,6+4)); }
  74. #include <stdio.h> auto int a=5; int main() { // Write C code here a++;++a; printf(“%d”,a); }
  75. #include <stdio.h> struct num { int bit_1:2; int bit_2:3; int bit_3:3 }; int main() { // Write C code here struct num a; a.bit_1=2; printf(“%d”,a.bit_1); }
  76. #include <stdio.h>
    int main() { // Write C code here int a=0x7; int b=0x8; printf("%d",a&b); }
  77. int main()
    {
    int x=0,y=5,z;
    z=x&&y||++y;
    printf("%d %d %d",x,y,z);
    }
  78. int main()
    { int x=5,y=0,z; z=x&&y||++x; printf("%d %d %d",x,y,z); }
  79. int main() { int a=5; a=~a; printf(“%d”,a); }
  80. struct stu { float a:5; }s1; int main() { s1.a=3; printf(“%d”,s1.a); }
  81. int main() { a=5; a=~a+a<<1; printf(“%d”,a); }
  82. int main() { char x=’a’; printf(“%d”,(x%10)++) }
  83. #include <stdio.h> int main() { int a=-5; a=(a++,++a); printf("%d",a);
    return 0; }
  84. #include<stdio.h> int main() { char *str[]={“Technologies”,”are”,”made”,”up”,”of”,”technology”}; printf(“%d %d”,sizeof(str),sizeof(str[0])); }
  85. int fun() { static int num=15; return num–; } int main() { for(fun();fun();fun()) printf(“%d”,fun()); }
  86. int main()
    {
    unsigned int a=10;
    a=~a;
    printf("%d/n",a);
    }
  87. main()
    {
    if(7&8)
    printf("honesty");
    if((~7&0x00f)==8)
    printf("is the best policy");
    }
  88. main()
    {
    int a=2; if(a>>1) printf("%d",a); }
  89. void main() { printf(“hello”); main(); }
  90. auto int x; int main() { int x=3; printf(“%d”,x); }
  91. void main() { int printf=12; printf(“%d”,printf); }
  92. #include <stdio.h>
    int main() { int x=8; int k= 0==1 &&x++; printf("%d %d",k,x);
    return 0; }
  93. int main() { printf(“%d”,fun(323)); } int fun(int num) { while(num) { count++; num>>=1; return count; }
  94. char ch=’A’; do{ printf(“%c “,ch); }while(++i||++(ch+1))
  95. int main() { int a=5; a=~a; printf(“%d”,a); }
  96. int main() { fun(10); } int fun(volatile int a) { a++; printf(“%d”,a); }
  97. int num=15; for(fun();fun();fun()) printf(“%d”,fun()); int fun() { return num–; }
  98. auto int a=3;// in gloal area if(a==3) printf(“…”); else printf(“…”);
  99. int main() { char ch=’a’; int k=(ch%10)++; printf(“%d”,k); }
  100. int a=5; a=~a<<1; printf(“%d”,a);
  101. #include <stdio.h>
    int main() { int a[]={1,2,3,4}; int i=0,*ptr; while(i<4) { ptr=&a[i]; printf("%d ",*(ptr+i)); i++; } }
  102. int k=-5; int x=(k++,++k); printf("%d",x);
    21. int i=0; while(i<10) { i++; printf("hi"); while(i<=8) { printf("hello"); i++; }}
  103. main() { int printf=9; printf(“%d”,printf); }
  104. main() { register static int x; x=10; printf(“%d”,x); }
  105. int main(static int x) { x=10; printf(“%d %d”,x); }
  106. int main() { int i=0; printf(“%d %d”,i); }
  107. void main(){ int a=-5; int k=(a++,++a); pf(“k”); }
  108. int main(){ char a=’a’; int x=(a%10)++; printf(“x”); }
  109. int main(){ char *ptr=”hEllo’; char str[]= “world”; ptr[1]=’e’; str[1]=’O’; printf(“ptr,str); }
  110. #include<stdio.h>
    auto int a; int main() { int a=10; printf("%dn",a); return 0; }
  111. #include<stdio.h>
    int main()
    {
    int arr[]={1,2,3},i=0,i++,--I;
    arr++;
    printf("%d%d",arr[i]);
    }
  112. #include<stdio.h>
    int main()
    {
    int code[]={1,2,3,4};
    printf("%d",-2[code]);
    }
  113. #include<stdio.h>
    int main()
    {
    int k=8;
    int x=0==1 && k++;
    printf("%d",x);
    }
  114. #include<stdio.h>
    int main() { int a=2,b=2,c=2,x,y,z; x=(++a)*(++a); y=(b++)*(++b); z=(c++)*(++c); printf("%d%d%d",x,y,z); }
  115. #include<stdio.h> int main() { int a=0xf0000000; int b=a>>1; printf(“%x”,b); return 0; }
  116. #include<stdio.h> #define MAX(x,y) ((x)>(y))? (x):(y) int main() { int x=1,y=5; printf(“%d”,MAX(++x,y++); return 0; }
  117. #include<stdio.h> int main() { int a=5; a=a~5<<1; printf(“%d”,a); return 0; }
  118. #include<stdio.h> int main() { int arr[5]={1,2,3,4,5}; int sum=0; for(i=0;i<5;i++) { if(i%2==0) { sum=+*(arr+i); } else { sum=-*(arr+i); } } printf(“%d\n”,sum); return 0; }
  119. int main()
    {
    int i=0;
    while(i<10)
    {
    i++;
    printf("hi\n");
    while(i<8)
    {
    i++;
    printf("hello\n");
    }
    }
    }
  120. int a=5;
    if(a==5)
    {
    a=~a+5<<1;
    printf("%d",a);
    }
  121. static int x=3;
    x++; if(x<=5) { printf("hi"); } else { printf("hello"); }
  122. int main() { struct bitfields { int bits_1:2; int bits_2:4; int bits_3:4; int bits_4:3; } bit={2,3,8,7}; }
  123. int main() { int printf=12; printf(“%d”,printf); }
  124. int main() { int i=0; while(i<2) { if(i==1) { break; i++; printf("in loop");
    if(i==1) { continue; printf("in while loop "); } } printf("after loop"); }
  125. int fun(char *msg,…); int main() { fun(“lets code”,2,7,8,10,20); return 0; } void fun(char *msg…) { va=start(ptr,msg); num=va_arg(ptr,int); num=va_arg(ptr,int); }
  126. int main() { int (*p)()=run; (*p)(); return 0; } int run () { printf(” “); }
  127. int main() { char temp; char arr[10]={1,2,3,4,5,6,7,8}; temp=(arr+1)[2]; printf(“%d\n”,temp); return 0; }
  128. int main() { unsigned int a=10; a=~a; printf(“%d”,a); }
  129. int main() { int a=5; a=~a+5<<1; printf(“%d”,a); }
  130. int main() { int printf=12; printf(“%d”,printf); }
  131. int main() { char str1[]=”Hello”; char str2[10]; char *t,*s; s=str1; t=str2; while(*t=*s) { *t++=*s++; printf(“%s\n”,str2); }
  132. int main() { char a=’a’; x=(a%10)++; printf(“%d\n”,x); }
  133. int main() { int i=0,j=0; while(i<2) { l1:i++;while(j<3) { printf(“loop\n”); goto l1; } }
  134. int main() { int code[]={1,2,3,4}; printf(“%d”-2[code]); }
  135. int main() { int a=-5,k; k=(a++,++a); printf(“%d”,k); }
  136. int main()
    {
    int printf=12;
    printf("%d", printf);
    return 0;
    }
  137. int main()
    {
    int a=5;
    a=fun(a);
    printf("%d", a);
    }
    int fun(volatile int a)
    {
    --a;
    printf("%d", a);
    return --a;
    }
  138. struct student
    {
    char *p;
    struct student *s;
    }bit;
    void main()
    {
    printf("%d", sizeof(bit);
    }
  139. int main()
    {
    int num=30;
    int k= (num<10)? 100:200;
    printf("%d", num);
    }
  140. int main()
    {
    int k=8;
    int x=0==1 && k++;
    printf("%d%d", x,k);
    }
  141. int main()
    {
    if(7 & 8)
    printf("Honesty");
    if(~7 & 0xf ==8)
    printf("is the best policy");
    }
  142. int main()
    {
    char str1[]="hello";
    char str2[10];
    char *t, *s;
    s= str1;
    t= str2;
    while(*t == *s)
    {
    ++t, ++s;
    }
    printf("%s", str2);
    }
  143. int main()
    {
    int a=5;
    if(a==5)
    {
    a= ~a+5<<1;
    printf("%d", a);
    }
    else
    {
    a= ~a;
    }
    }
  144. void main()
    {
    int a=3;
    a++;
    if(a<=5)
    {
    printf("hi");
    main();
    }
    }
  145. int main()
    {
    int x[4]= {1,3,3,7};
    int i;
    int *ptr;
    for(i=0; i<4; i++)
    {
    ptr= &x[i];
    printf("x[%d] is %d\n", *(ptr+i);
    }
    }
  146. int fun(void)
    {
    static int a= 15;
    return a--;
    }
    int main()
    {
    for(fun(); fun(); fun())
    {
    printf("%d", fun());
    }
    }
  147. #define mul(x,y) x*y
    int main()
    {
    printf("%d", mul(3+6,2+3));
    }
  148. int fun(int num)
    {
    int count=0;
    while(num)
    {
    count++;
    num= num>>1;
    }
    return count;
    }
    int main()
    {
    int num=323;
    int a=fun(323);
    printf("%d", a);
    }
  149. int main()
    {
    int a=2, b=2, c=2, x, y, z;
    x= ++a * ++a;
    y= b++ * b++;
    z= c+ ++c * c++;
    printf("%d%d%d", x, y, z);
    }
  150. struct student
    {
    float x:2;
    }bit;
    int main()
    {
    printf("%d", sizeof(bit));
    }
  151. struct student
    {
    int bit_1=1;
    int bit_2=4;
    int bit_3=4;
    int bit_4=4;
    };
    struct student bit= { 1, 3,7,8};
    int main()
    {
    printf("%d%d%d%d", bit.bit_1, bit.bit_2, bit.bit_3, bit.bit_4);
    }
  152. struct student
    {
    int i;
    char *p;
    };
    int main()
    {
    struct student a[]= {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
    }
  153. int main()
    {
    int a=10, i=0;
    while(i<10)
    {
    i++;
    if(i<6)
    continue;
    else
    break;
    printf("mirafra");
    }
    }
  154. int main()
    {
    int i=0, arr[10], ++i, --i;
    printf("%d", i);
    }
  155. int main()
    {
    char a= 'a';
    int z= (a%10)++;
    printf("%d", z);
    }
  156. int main()
    {
    char s[10]="alan";
    char r[10];
    r=s;
    printf("%s%s", r, s);
    }
  157. int main()
    {
    int n=10;
    arr[n]={1,2,4};
    printf("%d",sizeof(arr));
    }
  158. int main()
    {
    int a=10;
    printf("%d",a);
    }
    printf("%d",a);
    }
  159. main()
    {
    register int num;
    scanf("%d",&num);
    printf("%d",num);
    }
  160. #include<stdio.h>
    int main() { char temp; char arr[10]={1,2,3,4,5,6,9,8}; temp=(arr + 1)/[2]; printf("%d\n",temp); return 0; }
  161. #include<stdio.h> int main() { int arr[]={1,2,3},i=0,i++,–I; arr++; printf(“%d%d”,arr[i]); }
  162. #include<stdio.h> int main() { int code[]={1,2,3,4}; printf(“%d”,-2[code]); }
  163. #include<stdio.h> int main() { int a=0xf0000000; int b=a>>1; printf(“%x”,b); return 0; }
  164. #include<stdio.h> int man() { int a=10; a=~a; printf(“%d”,a); eturn 0; }
  165. #include<stdio.h> #define MAX(x,y) ((x)>(y))? (x):(y) int main() { int x=1,y=5; printf(“%d”,MAX(++x,y++); return 0; }
  166. #include<stdio.h> int main() { int a=5; a=a~5<<1; printf(“%d”,a); return 0; }
  167. #include<stdio.h> int main() { int arr[5]={1,2,3,4,5}; int sum=0; for(i=0;i<5;i++) { if(i%2==0) { sum=+*(arr+i); } else { sum=-*(arr+i); } } printf(“%d\n”,sum); return 0; }
  168. #include<stdio.h> struct data { int intfield:1 float floatfield:4; }; int main() { struct data d; d.intfield=222; d.floatfield=3.14; printf(“%f\n”,foatfield); return 0; }
  169. #include<stdio.h>
    int main()
    {
    char temp;
    char arr[10]={1,2,3,4,5,6,9,8};
    temp=(arr + 1)/[2];
    printf("%d\n",temp);
    return 0;
    }
  170. #include<stdio.h>
    int main()
    {
    int arr[]={1,2,3},i=0,i++,--I;
    arr++;
    printf("%d%d",arr[i]);
    }
  171. #include<stdio.h>
    int main()
    {
    int code[]={1,2,3,4};
    printf("%d",-2[code]);
    }
  172. #include<stdio.h>
    int main()
    {
    int k=8;
    int x=0==1 && k++;
    printf("%d",x);
    }
  173. #include<stdio.h>
    int main()
    {
    int a=2,b=2,c=2,x,y,z;
    x=(++a)*(++a);
    y=(b++)*(++b);
    z=(c++)*(++c);
    printf("%d%d%d",x,y,z);
    }
  174. #include<stdio.h>
    int main()
    {
    int a=0xf0000000;
    int b=a>>1;
    printf("%x",b);
    return 0;
    }
  175. #include<stdio.h>
    int man()
    {
    int a=10;
    a=~a;
    printf("%d",a);
    eturn 0;
    }
  176. #include<stdio.h>
    #define MAX(x,y) ((x)>(y))? (x):(y)
    int main()
    {
    int x=1,y=5;
    printf("%d",MAX(++x,y++);
    return 0;
    }
  177. #include<stdio.h>
    int main()
    {
    int a=5;
    a=a~5<<1;
    printf("%d",a);
    return 0;
    }
  178. #include<stdio.h>
    int main()
    {
    int arr[5]={1,2,3,4,5};
    int sum=0;
    for(i=0;i<5;i++)
    {
    if(i%2==0)
    {
    sum=+*(arr+i);
    }
    else
    {
    sum=-*(arr+i);
    }
    }
    printf("%d\n",sum);
    return 0;
    }
  179. #include<stdio.h>
    struct data
    {
    int intfield:1
    float floatfield:4;
    };
    int main()
    {
    struct data d;
    d.intfield=222;
    d.floatfield=3.14;
    printf("%f\n",foatfield);
    return 0;
    }
  180. #include<stdio.h>
    int main()
    {
    float a=1.3;
    if(a==1.3f)
    printf("true");
    else
    printf("false");
    return 0;
    }
  181. #include<stdio.h>
    int main()
    {
    int i;
    for(i=0;i<10;i++);
    {
    printf("%d",i);
    }
    }
  182. #include<stdio.h>
    int main()
    {
    int i;
    for(;;)
    {
    printf("forloop");
    }
    }
  183. #include<stdio.h>
    int main()
    {
    if(-5)
    {
    printf("germany\n");
    }
    if(5)
    {
    printf("texa\n");
    }
    printf("hope\n");
    }
  184. #include<stdio.h>
    int f(int a)
    {
    a>=20 ? return 10 : return 20 :
    }
    int main()
    {
    a=20;
    f(a);
    printf("%d",a);
    }
  185. #include<stdio.h>
    int main()
    {
    int a=5;
    int b=a++;
    printf("%d%d",a,b);
    }
  186. #include<stdio.h>
    int main()
    {
    int a,b,c;
    a=-25%-10;
    b=-25%10;
    c=25%-10;
    printf("%d%d%d",a,b,c);
    }
  187. char *ptr =null strcpy(ptr,”hii”); possible or not [VEM Technologies 2025]
  188. int *ptr = NULL; printf(“%d %d”, *ptr, &ptr); // → What is the output? [VEM Technologies Feb_2026]
  189. int main() { int n[3][3] = {{2,4,3}, {6,8,5}, {3,5, 13}}; int *ptr; ptr=n; printf(“%u”,n[2]); printf(“%d”,ptr[2]); printf(“%d”,*(ptr+2)); return 0; }[VOLTY IOT Solutions 25-06-2025]
  190. int main() { void *vp; char ch=74, *cp=”VOLTY”; int j=79; vp=cp; printf(“%c”,(char)vp); vp=&j; printf(“%c”,(int)vp); vp=cp; printf(“%s”,(char*)vp+2); return 0; }[VOLTY IOT Solutions 25-06-2025]
  191. Consider the declaration char x[] = “VOLTY”; char *y = “VOLTY”; What is the difference between two declarations? [VOLTY IOT Solutions 25-06-2025]
  192. int main() { char s[]={‘c’,’0′,’6′,’\n’,’f’,’\0′}; char p, str, *str1; p=&s[3]; str=p; str1=s; printf(“%x”, ++*p + ++*str1); return 0; }[VOLTY IOT Solutions 25-06-2025]
  193. int main() { int var; int *ptr=&var; *ptr=5; pf(“%d %d”,var,*ptr); } [TRUMINDS]
  194. int main() { static int var = 5; printf(“%d”, var–); if(var) main(); return 0; }[VOLTY IOT Solutions 25-06-2025]
  195. int main() { extern int i; i=20; printf(“%d”,i); return 0; } [VOLTY IOT Solutions 25-06-2025]
  196. static int i=10; int main() { i=5; for(i=0;i<5;i++) { static int a=29; printf(“%d”,a–); } return 0; } [VOLTY IOT Solutions 25-06-2025]
  197. static int i=9; int main() { i=5; for(;i<5;i++) { static int i=10; printf(“%d”,i); } } [VOLTY IOT Solutions 25-06-2025]
  198. static int i=10; Int main() { Int i=5; For(i=0;i<5;i++) { a=10; printf(“%d”,a++); } } [VOLTY IOT Solutions 25-06-2025]
  199. What the use of structure [Webber Feb_25]
    int main() { struct xx { int x=3; char name[] = "hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); return 0; }[VOLTY IOT Solutions 25-06-2025]
  200. struct s1 { int x; char c; int y; float z; };
    struct s2 { int a; struct s1 b; };
  201. int main() { struct s2 p = { 25, 195, ‘A’}; printf(“p.b.x = %d\n”, p.b.x); printf(“p.b.z = %f\n”, p.b.z); printf(“p.b.c = %d\n”, p.b.c); return 0; }[VOLTY IOT Solutions 25-06-2025]
  202. 1)IF n=2 using
    int a[++n]=n++;
    2)int main()
    {
    int var;
    int *ptr=&var;
    *ptr=5;
    pf("%d %d",var,*ptr);
    }
  203. int main()
    {
    int x,y=5,z=5;
    x=y==z;
    printf("%d",x);
    }
  204. int main()
    {
    for(fun();fun();fun())
    {
    pf("%d ",fun());
    }
    }
    int fun()
    {
    static int n=16;
    return n--;
    }
  205. #include<stdio.h>
    static int tmp=20;
    int main()
    {
    printf("%d",tmp);
    fun();
    printf("%d",tmp);
    }
    void fun()
    {
    static int tmp=10;
    printf("%d",tmp);
    }
  206. #include<stdio.h>
    #if X==10
    #define X 5
    #else
    #define Y 8
    #endif
    int main()
    {
    pf("%d %d",X,Y);
    }
  207. int main()
    {
    printf("helloworld");
    main();`
    }
  208. #include<stdio.h>
    int main()
    {
    int i=3;
    printf("%d",(++i)++);
    return 0;
    }
  209. struct node
    {
    int i;
    float j;
    }
    struct node *s(10);
  210. struct
    {
    short s[5];
    union
    {
    float y;
    cons z;
  211. void f(int *p,int m)
    {
    m=m+5;
    *p=p+m;
    return;
    }
    void main()
    {
    int i=5,j=10;
    f(&i,j)
    printf("%d",i+j);
    }
  212. the value of(489.1375*0.0843*1.956)/(0-0873*92.581*99.749)
  213. find the odd num in this series 10,25,45,54,60,75,80
  214. #include<stdio.h>
    int main()
    {
    int arr[]="applequiz"
    printf("%s",?);
    }
  215. int main()
    {
    x:=1;
    i:=1;
    while(x?5000)
    begin
    x:=2x;
    i:+i+1;
    end
    what is the value of i
    }
  216. #include<stdio.h>
    int main()
    {
    int str1[]="applequiz"
    int str2[]="applequiz"
    printf("%s",sizeof(str);
    }