#include<stdio.h>
main()
{
int a,b,c;
scanf("%d-%d-%d",&a,&b,&c);
printf("%d%d%d",a,b,c);
}
Type: Posts; User: murugaperumal
#include<stdio.h>
main()
{
int a,b,c;
scanf("%d-%d-%d",&a,&b,&c);
printf("%d%d%d",a,b,c);
}
You can't get the integer value for a string. But you can get the integer value for a character.
Example:
#include<stdio.h>
main()
{
printf("%d\n",'a');
}
Are you expecting like this?
#include<stdio.h>
main()
{
float a=12.343434;
printf("%.3f",a);
}
You can use the following code. But you need get the input as string.
#include<stdio.h>
main()
{
int number;
printf("Enter the 10 digit numbers\n");
...
You can use the following code, if you accept the input type as character array. Then the following code will work fine.
#include<stdio.h>
main()
{
char number[15];
...
The problem may be, you may forget to allocate the memory for that *board.
If it is not a problem, then show us the coding for the following function
void cell_on(board b, int r, int c);
...
You can use the following code
#include <stdio.h>
int main() {
char letter;
float number;
while(1) {
printf("Letter and Number: ");
scanf("%c %f", &letter, &number);
Use the following code
#include<stdio.h>
#include<string.h>
main()
{
void reverse(char[]);
char s[30];
int c;
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int data[50];
int i, n, start, stop;
printf("How many integers should I read (1--50)? ");
#include<stdio.h>
void bubble(int [],int n );
main()
{
int n;
int i;
int a[100];
int val;
printf("enter the n values :");
scanf("%d",&n);
Dear Friend,
Use the following URL
C Interview Questions
C Interview Questions and Answers - C Interview FAQs & C Books
For more details use the google search.
Dear Friend,
You can use the following coding also, to reverse the string.
#include<stdio.h>
#include<string.h>
#include<malloc.h>
char * reverse(char*);
Dear friend,
You have create the fork, it is correct. But in the parent you are tried to read the file and in the child you are tried to write. That also correct.
But in the parent...
Dear Friend,
You can't get the floating value correctly. Because in the putDigit function you gave the argument type as int. So if we pass the floating point value , it will convert the float...
Dear friend,
You did some mistake in the assign the pointer address. I have attach the correct code here. You need to change the coding in the main function only. No need to change any other...