String Literals Operations using Pointers in C

This Tutorial Explains Different Operations Performed on String Literals Using Pointers in C Programming A string literal is a sequence of characters terminated by null byte ‘0’. For example, /* strlit_op.c — program shows operations on string literals */ #include <stdio.h> #define NAME "What is your name?"   int main(void) { char name[25] = "xyz"; … Read more

advertisement

How Command Line Arguments are Passed and Processed in C?

This C Tutorial explains how Command Line Arguments are Passed and Processed in C. Let’s try to understand through a simple C program, /* cmd_args.c — how to pass and access command line arguments */ #include <stdio.h>   void process_cmd_args(char **);   int main(int argc, char *argv[]) { puts("**Program processes Command Line Arguments**"); /* process … Read more

advertisement

Command Line Arguments in C with Examples

This C Tutorial explains Command Line Arguments in C Programming with examples. Linux system gives us a command environment where we execute commands to perform certain tasks. For example, ls command lists files and directories in a directory ll gives long listing of files and directories in a directory Actually, such commands are programs. And … Read more

advertisement

What are Jump Tables in C?

This C Tutorial Explains Jump Tables in C with Examples. Let’s consider another application of pointer-to-functions, Jump tables! A jump table is a special array of pointer-to-functions. Since, this is an array, and as we know that all array elements must be of same type, therefore, it requires that all functions must be of same … Read more

advertisement

What are Callback Functions in C?

This C Tutorial explains Callback Functions in C with examples. Callback function technique is useful where you need to write a function that’s able to perform several different functions at a point or can perform a function specified only by the caller. Callback Functions in C is a technique required to pass a pointer-to-function to … Read more

advertisement

What is Function Pointer in C?

This C Tutorial explains Pointer to function in C with example. Just like pointer to integer, pointer to structure, pointer to node in a linked list, we can declare pointer to function. Again, just declaration isn’t enough. Like other pointers, pointer to function must be initialized before indirection can be performed on it. Also, make … Read more

advertisement

What is Declaration by Inference in C?

Question: What is Declaration by Inference in C Answer: Let’s try some examples of declaration of variables in C, int x; int *y; Observe that x is declared to be an integer. What about *y? Expression *y is also an integer. We deduce from here that y is a pointer to integer. This assertion can … Read more

advertisement

Pointer to Pointer in C with Example

Question: What is Pointer to Pointer in C Programming? Answer: A pointer is a variable that holds address, address of a variable of any basic types, address of a structure, address of an array or address of some other pointer variable. For example, int val = 10; int *pi = &val; /* pi is a … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.