📜  Wipro 面试问题设置 1

📅  最后修改于: 2022-05-13 01:58:38.997000             🧑  作者: Mango

Wipro 面试问题设置 1

25 题
1小时时间
都是 MCQ:
各1分,无负分
领域:C语言

1)

int main()
{
    int i;
    i = 0;
    if (x=0)
    {
        printf("x is zero");
    }
    else
    {
        printf("x is not zero");
    }
}

2)

int main()
{
    int i = -3;
    printf("%d n", (++i + ++i));
}

3)

int main()
{
    int x = 0xF01DEAD;
    printf("%X n",(x>>1)<<1);
}

4)

int main()
{
    char* s1 ;
    char* s2 ;
    s1 = "FIRST NAME";
    s2 = "LAST NAME";
    strcpy(s1,s2);
    printf("%s %s n",s1,s2);
}

5)

int main
{
    struct Student
    {
        int a;
        char b;
        char c;
        float f;
    }s1;
    printf("%dn",sizeof(s1));
}

6)

int main
{
    struct Student
    {
        short a[5];
        union Student
        {
            long c;
            float f;
        }u1;
    }s1;
    printf("%dn",sizeof(s1));
}

7)

int main()
{
    for (i=0; i<=2; i++)
        for (j=0; j<=i; j++)
            for(k=0; k<=j; k++)
        printf(""hello world");
}

8)

int main()
{
    for (count=5; sum+=--count; )
        printf("%d n",sum);
}

9)

int main()
{
    int i=0;
    while (i<10);
        print("hello world")'
}

10)

int main()
{
      (x && (x&(x-1))) --- indicates what?
}

更多关于指针、预处理器和静态的

Wipro 的所有练习题!