TCS Company Programming Functions

Which of the following function is used to accept string with white spaces?

A. getStrings();
B. getWhiteSpaceString();
C. scanf();
D. gets();

Read Solution (Total 3)

TCS Other Question

What will be the output?

public class Main
{
public static int main(String args[])
{
int x = 10;
int y = 10;
if (x^y)
System.out.println(" x is equal to y ");
return 0;
}
}

A. Nothing will print
B. Compile time error
C. x is equal to y
D. Runtime Error​
When we execute the given code after giving input, which output is displayed?

int main()
{
int a, b, c;
printf("Enter value of a & bn");
c = scanf("%d",&a,&b);
printf("%d",c);
getch():
return 0;
}