Comment on Tutorial - Pointers to Structures example program in C By Charles



Comment Added by : niru

Comment Added at : 2012-07-21 07:26:27

Comment on Tutorial : Pointers to Structures example program in C By Charles
#include<stdio.h>
void main(){
struct tag{
int a;
char *name;
};

struct tag t1;
printf("enter num and name\n");
scanf("%d %s",&t1.a,t1.name);
printf("%d %s",t1.a,t1.name);
}

whats wrong with the above program?


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Thank you. I found this very helpful.
View Tutorial          By: tavella at 2014-09-26 01:04:13

2. Hi Shweta, Thanks for pointing the typo error in t
View Tutorial          By: Jagan at 2008-07-12 21:36:46

3. why return&else statment repeating?
View Tutorial          By: sudhar at 2012-07-12 14:50:45

4. Nice code. It is working Fine.Thnx
View Tutorial          By: Tapasya Shukla at 2010-11-12 06:32:45

5. Hello,

A volatile variable does not

View Tutorial          By: aayush at 2009-11-16 07:38:23

6. Thanks.... Nice Example
View Tutorial          By: Nagarjuna at 2012-05-29 12:00:50

7. it worked fine in solving an algorithm assingment.
View Tutorial          By: tunde bello at 2009-11-05 06:31:28

8. Thanks for providing this page it works with local
View Tutorial          By: Dharam Jaswal at 2012-02-02 13:19:24

9. In this code what should i add in place of "y
View Tutorial          By: manju at 2011-11-10 09:01:50

10. Nice Intro .......
View Tutorial          By: MohanRaja at 2012-06-28 11:02:40