Online Test

:

 

Point out the error in the program?

#include<stdio.h>
int main()
{
    struct a
    {
        float category:5;
        char scheme:4;
    };
    printf("size=%d", sizeof(struct a));
    return 0;
}

What will be the output of the program?

#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;
}

 For which of the following, “PI++;” code will fail?


Declare the following statement?
"A pointer to a function which receives nothing and returns nothing".


What will be the output of the program?

#include<stdio.h>
#include<stdlib.h>
int main()
{
    char *i = "55.555";
    int result1 = 10;
    float result2 = 11.111;
    result1 = result1+atoi(i);
    result2 = result2+atof(i);
    printf("%d, %f", result1, result2);
    return 0;
}

What is the ouput of below c program?

#include<stdio.h>
int main()
{
    printf("Techepi");
    main();
    return 0;
}

What will be the output of the program?

#include<stdio.h>
int main()
{
    int i;
    i = printf("How r u\n");
    i = printf("%d\n", i);
    printf("%d\n", i);
    return 0;
}

Point out the error in the program?

#include<stdio.h>

int main()
{
    struct bits
    {
        float f:2;
    }bit;

    printf("%d\n", sizeof(bit));
    return 0;
}

What is the output of the following program?

#include<stdio.h>
void main()
{
        int x=10,y=20;
        x=((x>9) && y=30 ? printf("\nTRUE"): printf("\nFALSE"));
        printf("\ny=%d",y);
}

What is the output of the following program?

#include
void main()
{
        char c[]="gate2015";
        char *p=c;
        printf("%s",p+p[3]-p[1]);
}

What is the output of below c program?

#include<stdio.h>
int main()
{
  displayOut();
  return 0;
}
int displayOut()
{
  printf("Hi from techepi.com\n");
}

What will be the output of the program?

#include<stdio.h>
#define SQUARE(x) x*x
int main()
{
    float s=10, u=30, t=2, a;
    a = 2*(s-u*t)/SQUARE(t);
    printf("Result = %f", a);
    return 0;
}

Which of the following statements are true?
    P. Pointer to Array
    Q. Multi-dimensional array


 Which operator connects the structure name to its member name?


Which bitwise operator is suitable for turning off a particular bit in a number?

 

About Us

TechEpi.com is an online learning website.We cover the latest tech news,online tutorials,blog,online test for Aptitude,C,Java,PHP to improve your knowledge.

Newsletter


Follow TechEpi on