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 |
#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); }
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
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
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
How to palindrom string in c language?
How we print the table of 3 using for loop in c programing?
main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000