WAP to display 1,2,3,4,5........N
Answers were Sorted based on User's Feedback
Answer / sreejesh1987
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
clrscr();
printf("\nEnter n:");
scanf("%d",&n);
for(i=1;i<=n;i++)
printf("%d ",i);
getch();
}
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / arti sharma
void main()
{ int i,n,k;
printf("enter the limit");
scanf("%d",&n);
k=1;
i:
if(k<=n)
{ printf("%d",k);
k++;
goto i;
}
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
why array index always strats wuth zero?
main() { char not; not=!2; printf("%d",not); }
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
16 Answers Aricent, Cisco, Directi, Qualcomm,
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.