logo

Crowdly

Browser

Add to Chrome

Questions Bank (1228834 total)

Choose a correct statement about C language arrays.

 
0%
0%
0%
0%
View this question

What will be the output of the following program:

#include <stdio.h>

int main() {

    char str0[] = "TEST";

    char str1[4] = {'T', 'E', 'S', 'T'};

    char str2[] = {'T', 'E', 'S', 'T','\0'};

    int len0= strlen(str0);

    int len1= strlen(str1);

    int len2= strlen(str2);

    printf("str0: %c\n", str0[3]);

    printf("LENGHT OF str 0: %d\n", len0);

    printf("str1: %c\n", str1[3]);

    printf("LENGHT OF str1 1: %d\n", len1);

    printf("str2: %c\n", str2[4]);

    printf("LENGHT OF str2 2: %d\n", len2);

    return 0;

}

View this question

Choose a correct statement about C String.

char ary[]="Hello..!";
0%
0%
0%
0%
View this question

Choose a correct statement about C language arrays:

View this question

  • What will be the output of the program ?

    #include<stdio.h>

    #include<conio.>

    int main()

    {

    char sentence[80];

    int i;

    printf("Enter a line of text\n");

    gets(sentence);

    for(i=strlen(sentence)-1;

    i >=0; i--)

    putchar(sentence[i]);

    return 0;

    }
0%
0%
0%
0%
View this question

What is the output of C Program.?

int main()

{

int a[3] = {20,30,40};

a[0]++;

int i=0;

while(i<3)

{

printf("%d ", a[i]);

i++;

}

}

View this question

What will be the output of the program?

#include<stdio.h>

void main

()

{

int a[5] = {5, 1, 15, 20, 25}

;

int

i, j, m;

i =

++a[1]

;

j = a

[1]++

;

m = a

[i++]

;

printf("%d, %d, %d", i, j, m)

;

}
View this question

  • If the two strings are identical, then strcmp() function returns
View this question

_ dinner that first night in Tenerife just made me gloomy

View this question

_ dinner was excellent, but Isabel noticed that John ate very little.

0%
0%
View this question