Related Questions
What is the correct answer?
4
The output of the following code is:
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }
What is the correct answer?
4
All macro substitutions in a program are done before compilation of the program.
What is the correct answer?
4
The output of the following code is:
int f(int a, int b);
void main()
{
int a = 12, b=154;
printf("%d", f(a, b));
}
int f(int a, int b)
{
if (a<b) return(f(b, a));
if(b==0) return(a);
return (f(b, a % b));
}
What is the correct answer?
4
What is the right way to access value of structure variable book{ price, page }?
A. printf("%d%d", book.price, book.page);
B. printf("%d%d", price.book, page.book);
C. printf("%d%d"< price::book< page::book);
D. printf("%d%d", price>book, page>book);
What is the correct answer?
4
p++ executes faster than p + 1.
What is the correct answer?
4
The expression 'int j = 6 + 3 % -9;' evaluates to -1.
What is the correct answer?
4
What will be output if you will compile and execute the following c code?
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
What is the correct answer?
4
The function fopen() on failure returns---------------------.
What is the correct answer?
4
The output of the following code is:
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
What is the correct answer?
4
Which of the following keyword supports dynamic method resolution?
What is the correct answer?
4
If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?
What is the correct answer?
4
Which of the following is not an infinite loop
A. int i =1;
while (1)
{i++;}
C. int true=0< false;
while (true)
{false = 1;}
D. int y, x = 0;
do
{y = x;}
while (x==0);
What is the correct answer?
4
Which of the following expressions is wrong
What is the correct answer?
4
The same variable names of automatic type can be used in different functions without any conflict.
What is the correct answer?
4
What's wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
A. the question mark should be an equal sign
B. the first semicolon should be a colon
C. there are too many variables in the statement
D. the conditional operator is only used with apstrings
What is the correct answer?
4
The main() function can be called from any other function.
What is the correct answer?
4
static variable will not always have assigned value.
What is the correct answer?
4
Only one break can be used in one loop.
What is the correct answer?
4
C is a ___ language
A. High Level and Procedural
C. Middle Level and Procedural
D. Machine Level and OOPS
What is the correct answer?
4
Identify the wrong statement
What is the correct answer?
4
# define PI = 8;' is the correct declaration of macros.
What is the correct answer?
4
The output of the following code is:
main()
{
int a[10], i;
for (i = 1; I <= 0; i++)
{
scanf("%d", a[i]);
printf("%d", a[i]);
}
}
D. 1 to 10 will be displayed
What is the correct answer?
4
Bitwise operators can operate upon?
What is the correct answer?
4
The printf() function retunes which value when an error occurs?
What is the correct answer?
4
strcat() function ----------------------- two strings.
What is the correct answer?
4
Which header file is essential for using strcmp() function?
What is the correct answer?
4
The output of the following code is:
#define sqr(x= x*x)
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}
What is the correct answer?
4
When a user defined function is defined in program, then it has to be called at least once from the main().
What is the correct answer?
4
The identifier argv[] is a pointer to an array of strings.
What is the correct answer?
4
If 'str' is a string of 7 characters, the statement printf("%4s", str); will display ------characters.