By default, any real number in 'C' is treated as
If the declaration unsigned c:5; is replaced by unsigned : 6; then
One of the major difference between typedef and #define is that typedef interpretation is performed by the _________________ whereas #define interpretation is performed by the _____________
We want to declare x, y and z as pointers of type int. The alias name given is: intpt The correct way to do this using the keyword typedef is:
A file is preferable to an array of structures because
Minimun number of comparison required to compute the largest and second largest element in array is
Are the expressions arr and &arr same for an array of 10 integers?
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is
Comment on the following code below
#include
void main()
{
int x = 5;
if (true);
printf("hello");
}
Point out the error, if any in the program.
#include
int main()
{
int a = 10, b;
a >=5 ? b=100: b=200;
printf("%d\n", b);
return 0;
}
In the context of "break" and "continue" statements in C, pick the best statement.
#include
int i;
int main()
{
if (i);
else
printf("Ëlse");
return 0;
}
What is correct about the above program?
If the result underflow, the function returns zero.
What will be the output of the program?
#include
int main()
{
int i;
i = scanf("%d %d", &i, &i);
printf("%d\n", i);
return 0;
}
What will be the output of the program?
#include
#include
int main()
{
char *i = "55.555";
int result1 = 10;
float result2 = 11.111;
result1 = result1+atoi(i);
result2 = result2+atof(i);
printf("%d, %f", result1, result2);
return 0;
}
What will be the output of the following C code?
#include
int main()
{
int y = 0;
if (1 |(y = 1))
printf("y is %d\n", y);
else
printf("%d\n", y);
}
What will be the output of the following C code?
#include
int main()
{
char str[11] = "hello";
char *str1 = "world";
strcat(str, str1);
printf("%s %d", str, str[10]);
}
The______function returns a pointer to the first character of a token.
Output of following program
#include
int fun(char *p)
{
if (p == NULL || *p == '\0') return 0;
int current = 1, i = 1;
while (*(p+current))
{
if (p[current] != p[current-1])
{
p[i] = p[current];
i++;
}
current++;
}
*(p+i)='\0';
return i;
}
int main()
{
char str[] = "geeksskeeg";
fun(str);
puts(str);
return 0;
}
What will be the output of the program ?
#include
int main()
{
void *vp;
char ch=74, *cp="JACK";
int j=65;
vp=&ch;
printf("%c", *(char*)vp);
vp=&j;
printf("%c", *(int*)vp);
vp=cp;
printf("%s", (char*)vp+2);
return 0;
}
Total number of questions : 20
Number of answered questions : 0
Number of unanswered questions : 20
By default, any real number in 'C' is treated as
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
If the declaration unsigned c:5; is replaced by unsigned : 6; then
Your Answer : (Not Answered)
Correct Answer : C
No answer description available for this question.
One of the major difference between typedef and #define is that typedef interpretation is performed by the _________________ whereas #define interpretation is performed by the _____________
Your Answer : (Not Answered)
Correct Answer : C
The major difference between typedef and #define is that the typedef interpretation is performed by the compiler whereas #define interpretation is performed by pre-processor.
We want to declare x, y and z as pointers of type int. The alias name given is: intpt The correct way to do this using the keyword typedef is:
Your Answer : (Not Answered)
Correct Answer : D
It shows the correct way to declare x, y and z as pointers of type int using the keyword typedef. The advantage of using typedef with pointers is that we can declare any number of pointers in a single statement.
A file is preferable to an array of structures because
Your Answer : (Not Answered)
Correct Answer : D
No answer description available for this question.
Minimun number of comparison required to compute the largest and second largest element in array is
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
Are the expressions arr and &arr same for an array of 10 integers?
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
Comment on the following code below
#include
void main()
{
int x = 5;
if (true);
printf("hello");
}
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
Point out the error, if any in the program.
#include
int main()
{
int a = 10, b;
a >=5 ? b=100: b=200;
printf("%d\n", b);
return 0;
}
Your Answer : (Not Answered)
Correct Answer : C
No answer description available for this question.
In the context of "break" and "continue" statements in C, pick the best statement.
Your Answer : (Not Answered)
Correct Answer : D
No answer description available for this question.
#include
int i;
int main()
{
if (i);
else
printf("Ëlse");
return 0;
}
What is correct about the above program?
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
If the result underflow, the function returns zero.
Your Answer : (Not Answered)
Correct Answer : A
No answer description available for this question.
What will be the output of the program?
#include
int main()
{
int i;
i = scanf("%d %d", &i, &i);
printf("%d\n", i);
return 0;
}
Your Answer : (Not Answered)
Correct Answer : B
No answer description available for this question.
What will be the output of the program?
#include
#include
int main()
{
char *i = "55.555";
int result1 = 10;
float result2 = 11.111;
result1 = result1+atoi(i);
result2 = result2+atof(i);
printf("%d, %f", result1, result2);
return 0;
}
Your Answer : (Not Answered)
Correct Answer : C
Function atoi() converts the string to integer.
Function atof() converts the string to float.
result1 = result1+atoi(i);
Here result1 = 10 + atoi(55.555);
result1 = 10 + 55;
result1 = 65;
result2 = result2+atof(i);
Here result2 = 11.111 + atof(55.555);
result2 = 11.111 + 55.555000;
result2 = 66.666000;
So the output is "65, 66.666000" .
What will be the output of the following C code?
#include
int main()
{
int y = 0;
if (1 |(y = 1))
printf("y is %d\n", y);
else
printf("%d\n", y);
}
Your Answer : (Not Answered)
Correct Answer : A
No answer description available for this question.
What will be the output of the following C code?
#include
int main()
{
char str[11] = "hello";
char *str1 = "world";
strcat(str, str1);
printf("%s %d", str, str[10]);
}
Your Answer : (Not Answered)
Correct Answer : A
No answer description available for this question.
The______function returns a pointer to the first character of a token.
Your Answer : (Not Answered)
Correct Answer : D
The strtok() function returns a pointer to the first character of a token, if there is no token then a null pointer is returned.
Output of following program
#include
int fun(char *p)
{
if (p == NULL || *p == '\0') return 0;
int current = 1, i = 1;
while (*(p+current))
{
if (p[current] != p[current-1])
{
p[i] = p[current];
i++;
}
current++;
}
*(p+i)='\0';
return i;
}
int main()
{
char str[] = "geeksskeeg";
fun(str);
puts(str);
return 0;
}
Your Answer : (Not Answered)
Correct Answer : A
No answer description available for this question.
What will be the output of the program ?
#include
int main()
{
void *vp;
char ch=74, *cp="JACK";
int j=65;
vp=&ch;
printf("%c", *(char*)vp);
vp=&j;
printf("%c", *(int*)vp);
vp=cp;
printf("%s", (char*)vp+2);
return 0;
}
Your Answer : (Not Answered)
Correct Answer : D
No answer description available for this question.
Total number of questions : 20
Number of answered questions : 0
Number of unanswered questions : 20
We'll write only best content for you