C
Q. What will be the output of the following C code? (If the input is "Hello world")
#include <stdio.h> int main() { char str[30]; scanf("%s", str); printf("%s", str); return 0; }
When we read a string using the scanf() function, the input is terminated by the whitespace. Here, the input is "Hello world", so only "Hello" will be stored to str. Thus, the output will be "Hello".
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. What will be the output of following program ?
Q. What is ptr in the given statement?
Q. As soon as a pointer variable is freed, its value
Q. Library function pow() belongs to which header file?
Q. C is _______ type of programming language?
Q. Type of data and its value is described dy
Q. What will you do to treat the constant 3.14 as a float?
Q. Which of the following cannot be used as LHS of the expression in for (exp1 ;exp2 ; exp3) ?
Discusssion
Login to discuss.