Skip to content
All Basic Articles
Which of the following is correct with respect to “Jump Statements” in C? (A) goto (B) continue (C) break (D) return (E) All of the… Read More
A typical “switch” body looks as follows: switch (controlling_expression) {   case label1:     /*label1 statements*/     break;   case label2:     /*label1 statements*/     break;   default:     /*Default statements*/ } Which… Read More
What would happen when we compile and run this program? #include "stdio.h" int main() {   int i;    goto LOOP;   for (i = 0 ; i… Read More
In the context of “break” and “continue” statements in C, pick the best statement. (A) “break” can be used in “for”, “while” and “do-while” loop… Read More
How many terms are there in 3,9,27,81……..531441? (A) 25 (B) 12 (C) 13 (D) 14 Answer: (B) Explanation: 3, 9, 27, 81..............531441 form a G.P.… Read More
Which of the following statement is correct for switch controlling expression? (A) Only int can be used in “switch” control expression. (B) Both int and… Read More
What’s going to happen when we compile and run the following C program? #include "stdio.h" int main() {  int j = 0;  for ( ;… Read More
With respect to following “for” loops in C, pick the best statement. Assume that there is a prior declaration of ‘i’ in all cases for… Read More
Structured Query Language is a standard Database language which is used to create, maintain and retrieve the relational database. Following are some interesting facts about… Read More
What’s going to happen when we compile and run the following C program snippet? #include "stdio.h" int main() {  int a = 10;  int b… Read More
For a given integer, which of the following operators can be used to “set” and “reset” a particular bit respectively? (A) | and & (B)… Read More
In the context of modulo operation (i.e. remainder on division) for floating point (say 2.1 and 1.1), pick the best statement. (A) For floating point,… Read More
In the context of C data types, which of the followings is correct? (A) “unsigned long long int” is a valid data type. (B) “long… Read More
The atoi() function takes a string (which represents an integer) as an argument and returns its value. We have discussed iterative implementation of atoi(). How… Read More
#include "stdio.h"  int main() {  void *pVoid;  pVoid = (void*)0;  printf("%lu",sizeof(pVoid));  return 0; } Pick the best statement for the above C program snippet. (A)… Read More
Assume int is 4 bytes, char is 1 byte and float is 4 bytes. Also, assume that pointer size is 4 bytes (i.e. typical case)… Read More
Given a distance ‘dist, count total number of ways to cover the distance with 1, 2 and 3 steps.  Examples:  Input: n = 3 Output:… Read More
Suppose that in a C program snippet, followings statements are used. i) sizeof(int); ii) sizeof(int*); iii) sizeof(int**); Assuming size of pointer is 4 bytes and… Read More
Many folks get confused between these two terms which are associated with the Web. Are they really same? First thing first. HTML is a Language… Read More
These are two important header files used in C programming. While “<stdio.h>” is header file for Standard Input Output, “<stdlib.h>” is header file for Standard… Read More