what is the output of the following program
int change( int x ) {
x = 7;
}
main(){
int x = 5;
change(x);
printf(“%d”,x);
}
Answer
To copy a string into another, given:
char s1[30] = "xyz", s2[20];
Answer
To copy a string into another, given:
char s1[30] = "xyz", s2[20];
Answer
for(j=63 , i < 95 , i +=3) x += sqrt(j);
Answer
The computer performs computations internally using
AnswerWhat is the role of variables in programming languages:
Answerchoose the proper function to compute the cubic value of any input integer n:
Answerwhat is the best choice to print the value of variable x where:
int x = 123;
Answer
what is the best choice to store the natural number PI = 3.1459
AnswerThe value of z in the following statement:
int x = 9 , y = 2 , z = x / y;
Answer
To get a statement from the user input in the array
char s[100] :
Answer6. main() { extern int i; i=20; printf("%d",i); }
AnswerMain() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
AnswerVoid main() { int const * p=5; printf("%d",++(*p)); }
AnswerWill the program outputs "IndiaBIX.com"?
#include<stdio.h>
#include<string.h>
int main()
{
char str1[] = "IndiaBIX.com";
char str2[20];
strncpy(str2, str1, 8);
printf("%s", str2);
return 0;
}
Answer
We can modify the pointers "source" as well as "target".
AnswerPoint out the error in the following program.
#include<stdio.h>
void display(int (*ff)());
int main()
{
int show();
int (*f)();
f = show;
display(f);
return 0;
}
void display(int (*ff)())
{
(*ff)();
}
int show()
{
printf("IndiaBIX");
}
Answer
What will be the output of the program?
#include<stdio.h>
int main()
{
char huge *near *far *ptr1;
char near *far *huge *ptr2;
char far *huge *near *ptr3;
printf("%d, %d, %d\n", sizeof(**ptr1), sizeof(ptr2), sizeof(*ptr3));
return 0;
}
Answer
What do the following declaration signify?
void *cmp();
Answer
Point out the correct statement which correctly free the memory pointed to by 's' and 'p' in the following program?
#include<stdio.h>
#include<stdlib.h>
int main()
{
struct ex
{
int i;
float j;
char *s
};
struct ex *p;
p = (struct ex *)malloc(sizeof(struct ex));
p->s = (char*)malloc(20);
return 0;
}
Answer
© 2017 QuizBucket.org