Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Programming Questions
Consider the following C program: main() { char s[] = "man"; int i; for (i = 0; s[i]; i++) printf(" %c%c%c%c", s[i], *(s + i), *(i + s), i[s]); } What is the output of this program?
Consider the following C code: #include <stdio.h> int main() { int x = 123; int i = { printf("c""++") }; for (x = 0; x <= i; x++) { printf("%x ", x); } return 0; } What will be the output of this program?
In programming language terminology, a source program is typically written in which level of language?
Consider the C program: main() { char *p; p = "Hello"; printf("%c ", *&*p); } What will be the output when this program is executed?
In the C programming language, which of the following is not a valid escape sequence in a string or character literal?
Consider the following C code: #define clrscr() 100 int main() { clrscr(); printf("%d ", clrscr()); return 0; } What will be the output when this program is executed?
In Android application development, which of the following Java code snippets correctly launches a new activity from the current activity?
In information security and data communications, the coding or scrambling of data so that humans cannot read it directly is known as what?
In Java, what is the meaning of the method header public static void main(String[] args) that appears in many programs?
Given that the IEEE 754 single precision binary representation of 5.375 is 0100 0000 1010 1100 0000 0000 0000 0000, consider this C program on a little endian machine: main() { float a = 5.375; char *p; int i; p = (char *) &a; for (i = 0; i <= 3; i++) printf(" %02x", (unsigned char) p[i]); } What hexadecimal byte sequence will this program print?
Consider the C code: enum colors { BLACK, BLUE, GREEN }; int main() { printf("%d..%d..%d", BLACK, BLUE, GREEN); return 1; } What output will this program produce?
Consider the following C code: #include <stdio.h> void main() { signed int a = -1; unsigned int b = -1u; if (a == b) printf("The Lord of the Rings"); else printf("American Beauty"); } What will be the output when this program is executed on a typical 32 bit system?
In C programming, what will be the output of the following program that passes a float argument to an external function and returns it as an int? main() { extern int fun(float); int a; a = fun(3.14); printf("%d", a); } int fun(float aa) { return ( (int) aa ); }
In general programming terminology, repeating a group of statements multiple times in sequence or based on a condition is usually called what?
In C programming, what will be the output when you execute the following code that uses the logical OR operator to compute an array index? #include
void main() { const int SIZE = 5; int expr; double value[SIZE] = { 2.0, 4.0, 6.0, 8.0, 10.0 }; expr = 1 || 2 || 3 || 4; printf("%f", value[expr]); }
In standard C programming, is the statement "A function cannot be defined inside another function" true or false with respect to nested function definitions?
In C programming, what will be the output of the following program that computes the average of a maximum and minimum value? #include
int main() { int max_val = 100; int min_val = 10; int avg_val; avg_val = (max_val + min_val) / 2; printf("%d", avg_val); return 0; }
In programming language history, the language SNOBOL is mainly used for which type of operations?
In C programming, what is the result when you compile the following code that uses variable expressions in switch case labels? #include
int main() { int a = 1, b = 1; switch (a) { case a * b: printf("yes "); case a - b: printf("non"); break; } return 0; }
In object oriented (OO) design, which statement best describes the concept of cohesion as it applies to the responsibilities of a single class?
1
2
3
4
5
6