Q.1

What will be the output of the program?

#include<stdio.h>

int main()
{
    int i;
    char c;
    for(i=i<=i++)
    {
        scanf("%c", &c); /* given input is 'b' */
        ungetc(c, stdout);
        printf("%c", c);
        ungetc(c, stdin);
    }
    return}
  • bbbb
  • bbbbb
  • b
  • Error in ungetc statement.
Q.2

Does there any function exist to convert the int or float to a string?

  • Yes
  • No
Q.3

What will be the output of the program?

#include<stdio.h>
#include<stdlib.h>

int main()
{
    char *i = "55.555";
    int result1 =
    float result2 = 11.
    result1 = result1+atoi(i);
    result2 = result2+atof(i);
    printf("%d, %f", resultresult2);
    return
}
  • 55, 55.555
  • 66, 66.666600
  • 65, 66.666000
  • 55, 55
Q.4

What is the purpose of fflush() function.

  • flushes all streams and specified streams.
  • flushes only specified stream.
  • flushes input/output buffer.
  • flushes file buffer.
Q.5

What will be the output of the program?

#include<stdio.h>
#include<string.h>

int main()
{
    char dest[] = {0};
    char src[] = "aaa";
    int i;
    if((i = memcmp(dest, src, 2))==
        printf("Got it");
    else
        printf("Missed");
    return
}
  • Missed
  • Got it
  • Error in memcmp statement
  • None of above
Q.6

Can you use the fprintf() to display the output on the screen?

  • Yes
  • No
Q.7

What will function gcvt() do?

  • Convert vector to integer value
  • Convert floating-point number to a string
  • Convert 2D array in to 1D array.
  • Covert multi Dimensional array to 1D array
Q.8

What will the function randomize() do in Turbo C under DOS?

  • returns a random number.
  • returns a random number generator in the specified range.
  • returns a random number generator with a random value based on time.
  • return a random number with a given seed value.
Q.9

What will be the output of the program?

#include<stdio.h>

int main()
{
    int i;
    char c;
    for(i=i&lt=i++)
    {
        scanf("%c", &c); /* given input is 'a' */
        printf("%c", c);
        ungetc(c, stdin);
    }
    return
}
  • aaaa
  • aaaaa
  • Garbage value.
  • Error in ungetc statement.
0 h : 0 m : 1 s