C Programming - Strings - Discussion

Discussion Forum : Strings - Find Output of Program (Q.No. 31)
31.
What will be the output of the program in Turbo C?
#include<stdio.h>

int main()
{
    char str[10] = "India";
    str[6] = "BIX";
    printf("%s\n", str);
    return 0;
}
India BIX
BIX
India
Error
Answer: Option
Explanation:

str[6] = "BIX"; - Nonportable pointer conversion.

Discussion:
16 comments Page 2 of 2.

Vishal modi said:   1 decade ago
Nonportable pointer conversion means. ?
(1)

Mahant said:   9 years ago
It's printing India in windows 16 also.

Sindhuja said:   1 decade ago
What is non-portable conversion?
(1)

Nav said:   1 decade ago
What is nonportable conversion?

Avinash said:   1 decade ago
What is nonportable converter?

Pavani said:   1 decade ago
What is nonportable pointers?


Post your comments here:

Your comments will be displayed after verification.