(beta) Login local_offer
tags
mail
contact us

Which is valid C expression?

Sep 03, 2019 16:38:06 UTC

Predict the output or error(s):

main()
{
    char *p;
    p="Hello";
    printf("%c\n",*&*p);
}
Dec 27, 2017 08:35:25 UTC

What will happen if the below program is executed?

#include <stdio.h>
int main()
{
    int main = 3;
    printf("%d", main);
    return 0;
}
Sep 03, 2019 16:41:11 UTC

What is the output of this C code?

#include <stdio.h>
int main()
{
    printf("Hello World! %d \n", x);
    return 0;
}
Sep 03, 2019 16:39:38 UTC

Predict the output or error(s) for the following:

main()
{
    int c=- -2;
    printf("c=%d",c);
}
Dec 27, 2017 08:32:26 UTC

Predict the output or error(s) for the following:

main()
{
    float me = 1.1;
    double you = 1.1;
    if(me==you)
        printf("I love U");
    else
        printf("I hate U");
}
Dec 27, 2017 08:26:57 UTC

What is the output of this C code?

#include  <stdio.h>
int main()
{
   char chr;
   chr = 128;
   printf("%d\n", chr);
   return 0;
}
Sep 03, 2019 16:42:40 UTC

Predict the output or error(s) for the following:

void main()
{
    int const * p=5;
    printf("%d",++(*p));
}
Dec 27, 2017 08:21:23 UTC