can u give me the c codings for converting a string into
the hexa decimal form......
Answer / ravi jaiswal
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char x[25];
int i=0;
printf("Enter a string");
gets(x);
while(x[i]!='\0')
{
printf("%x\t",x[i]);
i++;
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
main() { extern int i; i=20; printf("%d",i); }
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
What is your nationality?
main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16
Display the time of the system and display the right time of the other country