Question
Asked @
Answers
Views
select
main()
{
char *str1="abcd";
char str2[]="abcd";
printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));
}
1
17
main()
{
char *cptr,c;
void *vptr,v;
c=10; v=0;
cptr=&c; vptr=&v;
printf("%c%v",c,v);
}
1
10
main()
{
main();
}
1
11
What is the problem with the following code segment?
while ((fgets(receiving array,50,file_ptr)) != EOF)
;
1
13
main()
{
char name[10],s[12];
scanf(" \"%[^\"]\"",s);
}
How scanf will execute?
1
13
what will be the position of the file marker?
a: fseek(ptr,0,SEEK_SET);
b: fseek(ptr,0,SEEK_CUR);
1
15
What are the files which are automatically opened when a C
file is executed?
1
11
main()
{
int i=-1;
+i;
printf("i = %d, +i = %d \n",i,+i);
}
1
15
int i,j;
for(i=0;i<=10;i++)
{
j+=5;
assert(i<5);
}
1
17
main()
{
int i, n;
char *x = “girl”;
n = strlen(x);
*x = x[n];
for(i=0; i<n; ++i)
{
printf(“%s\n”,x);
x++;
}
}
1
9
main ( )
{
static char *s[ ] = {“black”, “white”, “yellow”,
“violet”};
char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;
p = ptr;
**++p;
printf(“%s”,*--*++p + 3);
}
1
7
main( )
{
void *vp;
char ch = ‘g’, *cp = “goofy”;
int j = 20;
vp = &ch;
printf(“%c”, *(char *)vp);
vp = &j;
printf(“%d”,*(int *)vp);
vp = cp;
printf(“%s”,(char *)vp + 3);
}
1
10
main( )
{
char *q;
int j;
for (j=0; j<3; j++) scanf(“%s” ,(q+j));
for (j=0; j<3; j++) printf(“%c” ,*(q+j));
for (j=0; j<3; j++) printf(“%s” ,(q+j));
}
1
8
main( )
{
static int a[ ] = {0,1,2,3,4};
int *p[ ] = {a,a+1,a+2,a+3,a+4};
int **ptr = p;
ptr++;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
*ptr++;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
*++ptr;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
++*ptr;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
}
1
10
main( )
{
int a[ ] = {10,20,30,40,50},j,*p;
for(j=0; j<5; j++)
{
printf(“%d” ,*a);
a++;
}
p = a;
for(j=0; j<5; j++)
{
printf(“%d ” ,*p);
p++;
}
}
1
10
E-Mail New Answers
Answer Selected Questions
Post New C Code Question
Prev 1 ... 3 ... 5 ... 7 8 [9] 10 ... 11 ... 13 ... 15 ... 17 ... 19 ... 21 Next
Un-Answered Questions
Question
Views
Asked at
Select
Set up procedure for generating a wire frame display of a
polyhedron with the hidden edges of the object drawn with
dashed lines
318
IBM
Can you send Code for Run Length Encoding Of BMP Image in C
Language in linux(i.e Compression and Decompression) ?
433
Honeywell
find simple interest & compund interest
41
Design an implement of the inputs functions for event mode
299
How we print the table of 2 using for loop in c
programing?
37
create a C-code that will display the total fare of a
passenger of a taxi if the driver press enter,the timer will
stop. Every 10 counts is 2 pesos.
Initial value is 25.00
120
Microsoft
can u give me the c codings for converting a string into
the hexa decimal form......
201
main()
{
extern int i;
{ int i=20;
{
const volatile unsigned i=30; printf("%d",i);
}
printf("%d",i);
}
printf("%d",i);
}
int i;
48
Implement a t9 mobile dictionary.
(Give code with explanation )
511
Yahoo
Write a program to model an exploding firecracker in the xy
plane using a particle system
389
HCL
Write a program to implement the motion of a bouncing ball
using a downward gravitational force and a ground-plane
friction force. Initially the ball is to be projected in to
space with a given velocity vector
508
Develop a routine to reflect an object about an arbitrarily
selected plane
301
Write a routine to implement the polymarker function
404
main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);
}
a. 100, Runtime error.
b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number
7
HCL
why nlogn is the lower limit of any sort algorithm?
22
Given a spherical surface, write bump-mapping procedure to
generate the bumpy surface of an orange
337
How to count a sum, when the numbers are read from stdin and
stored into a structure?
26
write a program for area of circumference of shapes
28
E-Mail New Answers
Answer Selected Questions