print numbers till we want without using loops or condition
statements like specifically(for,do while, while swiches,
if etc)!
Answers were Sorted based on User's Feedback
Answer / vijay
main()
{
static int i;
printf("%d \n",i++);
main();
}
| Is This Answer Correct ? | 3 Yes | 19 No |
main() { int i=5; printf("%d",++i++); }
struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error
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
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
Printf can be implemented by using __________ list.
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
Develop a routine to reflect an object about an arbitrarily selected plane
What is the hidden bug with the following statement? assert(val++ != 0);