Basics of C "Alphabets"
Topics covered for the day :
Intorduction on LikeCProgramming tutours
Importance of C porgamming
Introduction to C Programming
Alphabets of C
Tokens
Identifiers
Constant (Integer Only)
Few simple programming snippets
Importance of C porgamming
Introduction to C Programming
Alphabets of C
Tokens
Identifiers
Constant (Integer Only)
Few simple programming snippets
Programming snippets
/* 1. Happy path : Successful execution of program */
void main()
{
puts ("Welcome to our C programming classes");
}
void main()
{
puts ("Welcome to our C programming classes");
}
/* 2. Pre-processor usage : #include <stdio.h> */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes");
}
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes");
}
/* 3. Printf without Preprocessor
Output : Compilation error*/
void main()
{
printf ("Welcome to our C programming classes");
}
Output : Compilation error*/
void main()
{
printf ("Welcome to our C programming classes");
}
/* 4. Importance of " ; " */
/* Output : Compilation Error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes")
}
/* Output : Compilation Error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes")
}
/* 5. Chnage in return type */
/* Output : Successful execution of program */
#include <stdio.h>
int main()
{
printf ("Welcome to our C programming classes");
}
/* Output : Successful execution of program */
#include <stdio.h>
int main()
{
printf ("Welcome to our C programming classes");
}
/* 5. Difference in return type */
/* Output : Successful execution of program, BUT with warnings */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes");
return 10;
}
/* Output : Successful execution of program, BUT with warnings */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes");
return 10;
}
/* 6. White spaces after double quotes */
/* Output : Successful execution of program */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes"
/* Output : Successful execution of program */
#include <stdio.h>
void main()
{
printf ("Welcome to our C programming classes"
);
}
}
/* 7. White spaces with in double quotes */
/* Output : Compilation error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C
/* Output : Compilation error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C
programming classes");
}
}
/* 8. White spaces with in double quotes */
/* Output : Compilation error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C
/* Output : Compilation error */
#include <stdio.h>
void main()
{
printf ("Welcome to our C
programming classes");
}
}
No comments:
Post a Comment