no need to assign all the values. you need to send two pointers to the function that will copy the structure.
void copy_struct(instruction *src, instruction *dest)
{
*dest=*src;
}
Type: Posts; User: ungalnanban
no need to assign all the values. you need to send two pointers to the function that will copy the structure.
void copy_struct(instruction *src, instruction *dest)
{
*dest=*src;
}
See the following code.
This is the predefine FILE structure. in stdio.h
typedef struct {
char *fpos; /* Current position of file pointer (absolute address) */
void *base; /*...
See the following Example for check the character is '\' or not
#include<stdio.h>
main()
{
int c;
while((c=getchar())!=EOF) {
Here is the algorithm ,
1 . Create a message queue id by using the "msgget".
2 . Then open the source file and copy a line to the message queue buffer then send that to the queue.
3 . Among...
See the following links.
http://cboard.cprogramming.com/c-programming/24397-some-c-test-questions-challenge.html
Advanced Test in C
100 Multiple choice questions in C
C programming questions...
Are you trying for this? See one more Example.
#include <stdio.h>
#include <string.h>
#include<stdlib.h>
#include<malloc.h>
char *replace(char *str, char *old, char *new) {
Yes, your code has small logical mistake.
first scanf is for getting the student name, so scores[i] is enough but you have used
scanf("%s",scores[i][j]);
See the following code.
Dear Friend,
May be your file is not flushed, use the fflush(in),
I used "fprintf" instead of "write " function the file content is cpoied in to the second file.
sample code:...
in your program you need to use the single quote.
because the variable type "letter" is char. your comparing the values using == . so it needs the ASCII value
if you use the switch statement that...
you can print the integer values using your function. you cannot print the floating values.
because.
[%] modules operations are only allowed for integer. see in your code the following line
...
Dear friend see the following example code, It will copy the file "plan" from one directory to another directory using the system call.
Example Code
#include<stdio.h>
#include<malloc.h>...
Dear Friends, I want to know witch one of the following choice is correct answer for the following sample code.
Sample Code
int sum_matrix (int m [][][], int 12, int y,...