C Programming Questions Answers - Chapter 1
-
1. We can insert pre written code in a C program by using
- #read
- #get
- #include
- #put
Answer And Explanation
Answer: Option C
Explanation:
-
2. The first expression in a for loop is
- Step value of loop
- Value of the counter variable
- Any of above
- None of above
Answer And Explanation
Answer: Option B
Explanation:
-
3. Break statement is used for
- Quit a program
- Quit the current iteration
- Both of above
- None of above
Answer And Explanation
Answer: Option B
Explanation:
-
4. Continue statement used for
- To continue to the next line of code
- To stop the current iteration and begin the next iteration from the beginning
- To handle run time error
- None of above
Answer And Explanation
Answer: Option B
Explanation:
-
5. What will be output of
#include
void main()
{
char test =`S`;
printf("\n%c",test);
}- S
- Error
- Garbage value
- None of above
Answer And Explanation
Answer: Option A
Explanation:
-
6. Due to variable scope in c
- Variables created in a function cannot be used another function
- Variables created in a function can be used in another function
- Variables created in a function can only be used in the main function
- None of above
Answer And Explanation
Answer: Option A
Explanation:
-
7. What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}
- error
- 0
- 10
- Garbage value
Answer And Explanation
Answer: Option B
Explanation:
-
dilee kumar 6 years ago
question in hindi
-
Manohar 6 years ago
provide new updates
-
Kiran Patel 7 years ago
size of void pointer is 4 bytes
are you using 16 bit compiler???then it will be 2 byte..
pls check -
Haaris 8 years ago
where is chapter 2 and rest of other chapters?
-
Richa 11 years ago
what is the output of this progm..?
int main()
{
char boolean[][6]={"TRUE",FALSE"};
printf("%s",boolean[(unsigned int)-1 == ~0]);
}