but when we use a pointer doesn't it actually refer only the address???
Type: Posts; User: phoneix_hallows
but when we use a pointer doesn't it actually refer only the address???
why does the compiler ask for an & sign before a pointer????
printf("\nEnter the employee number of employee %d:\t",i+1);
scanf("%d",&ptr[i]->no);
thanks!!!!
can you pls tell me how to rectify this error
line 8: error: field 'date' has incomplete type
#include<stdio.h>
struct EMP
{
okie.... i'll do that.... thanks guys
also how should the user enter the date ....... should it be like "ddmmyyyy" or how so that the day, month and year are stored correctly in the specified struct members
if i want to get the date from the user.... say, "Enter the date of joining", how to get the input from the user using struct tm???
the pseudo code helped me.... thanks!!
still.... i'm not able to find my error.....
***incremented the value of i in the while loop**** that was very silly from my side
thanks for ur time mate
all the characters in the output screen are what i typed
i'm getting an incorrect output.... no errors... sorry for not specifying these things in my first post...
./a.out
Enter string
abcd
enlighten me with my mistake
#include<stdio.h>
int str_rev(char *s1)
{
char str2[50];
char *s2=str2;
got it!!! thanks
how does i access the structure variable by using an array of pointers to that structure..... also the structure variable is an array in this case...
say for example
struct EMP
{
...
that was really helpful...... thanks... this forum is really amazing!!!!!
actually i've to use the date inside a structure only... so thought it ' d further mess up the code by using nested structures......
thanks for your suggestions
what data type can be used to get the "DATE" from the user???
say, for example. date of joining of an employee
thanks for clarifying guys
sorry, the above returns the following warning msg on compilation
warning: incompatible implicit declaration of built-in function ‘exit’
can exit(0) be used in a local function so that the program ends like wat i 've used in the above code???
actually the above code returns an error
i want to know how to use the exit(0) in the following code...... also the difference between exit(0) and exit(1)... thanks
int check(char *s1)
{
int i=0;
while(*(s1+i) != '\0')
...
thanks a lot !!!!
actually i want to do it using pointers.... is there any way to do so.... i want it to be simple like the incorrect code i tried above..... apologies for bothering u too much
thanks again..... i shall try and get back to you