Tech Kaizen

passion + usefulness = success .. change is the only constant in life

Search this Blog:

C Programming - Pointers

Pointers Varieties

(1) int *p; // p is a pointer to an integer quantity

(2) int *p[10]; // p is a 10-element array of pointers to integer quantities

(3) int (*p)[10]; // p is a pointer to a 10-element integer array

(4) int *p(void); // p is a function that returns a pointer to an integer quantity

(5) int p(char *a); // p is a function that accepts an argument which is a pointer to a character returns an // integer quantity

(6) int *p(char *a); // p is a function that accepts an argument which is a pointer to a character returns a // pointer to an integer quantity

(7) int (*p)(char *a); // p is pointer to a function that accepts an argument which is a pointer to a character // returns an integer quantity

(8) int (*p(char *a))[10]; // p is a function that accepts an argument which is a pointer to a character returns a // pointer to a 10-element integer array

(9) int p(char (*a)[]); // p is a function that accepts an argument which is a pointer to a character array returns // an integer quantity

(10) int p(char *a[]); // p is a function that accepts an argument which is a array of pointers to characters // returns an integer quantity

(11) int *p(char a[]); // p is a function that accepts an argument which is a character array returns a pointer to // to an integer quantity

(12) int *p(char (*a)[]); // p is a function that accepts an argument which is a pointer to a character array returns a // pointer to an integer quantity

(13) int *p(char *a[]); // p is a function that accepts an argument which is an array of pointers to characters // returns a pointer to an integer quantity

(14) int (*p)(char (*a)[]); // p is pointer to a function that accepts an argument which is a pointer to a character array // returns an integer quantity

(15) int *(*p)(char (*a)[]); // p is pointer to a function that accepts an argument which is a pointer to a character array // returns a pointer to an integer quantity

(16) int *(*p)(char *a[]); // p is pointer to a function that accepts an argument which is a array of pointers to // characters returns a pointer to an integer quantity

(17) int (*p[10])(void); // p is 10-element array of pointers to functions; each function returns an integer quantity

(18) int (*p[10])(char a); // p is 10-element array of pointers to functions; each function accepts an argument which is // a character and returns an integer quantity

(19) int *(*p[10])(char a); // p is 10-element array of pointers to functions; each function accepts an argument which is // a character and returns a pointer to an integer quantity


(20) int *(*p[10])(char *a); // p is 10-element array of pointers to functions; each function accepts an argument which is // a pointer to a character and returns a pointer to an integer quantity


Pointer-to-Pointer and Reference-to-Pointer

This article explains the reason behind using pointer-to-pointer and reference-to-pointer to modify a pointer passed to a function, to better understand their usage.

When we use "pass by pointer" to pass a pointer to a function, only a copy of the pointer is passed to the function. We can say "pass by pointer" is passing a pointer using "pass by value." In most cases, this does not present a problem. But, a problem arises when you modify the pointer inside the function. Instead of modifying the variable, it points to it by de-referencing. When you modify the pointer, you are only modifying a copy of the pointer and the original pointer remains unmodified.

Please look at the "Pointer-to-Pointer and Reference-to-Pointer" for the complete example.

All the Best !!!


Links
www.c4swimmers.net

Pointer-to-Pointer and Reference-to-Pointer -http://www.codeguru.com/cpp/cpp/cpp_mfc/pointers/article.php/c4089/

http://www.codeproject.com/KB/cpp/PtrToPtr.aspx

Posted by Krishna Kishore Koney
Labels: C PROGRAMMING

Linux Performance and Development Tools

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
-
Brian W. Kernighan

Performance Analysis Tools
Benchmarks

LMbench - Low-level performance benchmark tools.
STREAM - Sustainable memory bandwidth benchmark.
Calibrator - A cache-memory and TLB latency measurement tool.
Bonnie++ - A disk I/O benchmark.
System Analysis
KCachegrind - Source intermixed with profiling data.
OProfile - A system-wide profiler.
The Linux Trace Toolkit - A kernel-level tracer.
Syscalltrack - Track invocations of system calls (a system-wide strace).
Dynamic Probes - Linux debugger that can be used to insert software probes dynamically into executing code.

Development Tools
Static Code Analysis
Splint - A static checker (was called clint).
RATS - Rough Auditing Tool for Security. Similar to Flawfinder.
Flawfinder - a program that examines source code for security issues. Similar to RATS.
Smatch - The Source Matcher, based on papers about the Stanford Checker.
Sparse - a static type-checking tool for the Linux kernel (written by Linus Torvalds).
Dynamic Debugging
Dmalloc - Debug malloc library.
Mpatrol - another debugging malloc library.
Valgrind - An open-source memory debugger.
Electric Fence - A memory bounds checker.
BFBTester - A tool that does quick proactive security checks of binaries.
Compilation and Documentation Tools
Ccache - A compiler cache. This is a MUST HAVE.
Doxygen - A documentation system.
Code Coverage Tools
Gcov - A code coverage tool that works with gcc
Ggcov - A GUI for gcov
Other Possibly Interesting Stuff
LSM - Linux Security Modules.
Mudflap and Libmudflap - Patches for gcc/egcs.
Static Code Analysis
Flawfinder - Static security analysis tool (written in Python).
ITS4 - Software Security Tool. Not under GPL.
Cqual - A tool for adding type qualifiers to C.
MOPS - MOdelchecking Programs for Security properties.
BOON - Buffer Overrun detectiON.
Test Suites
Linux Test Project
Open POSIX Test Suite

Links:
http://www.mostang.com/~davidm/papers/expo97/paper/doc004.html

Note:
All above information is available in Internet … I just gathered the info and put here … Just recompilation nothing more than that. Thanks a lot to the Webpage owners.


UNIX Commands

1. UNIX Mount Commands:

AIX: mount –r –v cdrfs /dev/cd0 /cdrom

HP-UX: mount –o cdcase –F cdfs /dev/dsk/c0t0d0 /cdrom

SCO OpenServer: mount –r /dev/cd0 /cdrom

SCO UnixWare: mount –F cdfs –o ro /dev/cdrom/cdrom1 /cdrom

Solaris: mount –r –F hsfs /dev/cd0 /cdrom

Linux: mount –r –t iso9660 /dev/cdrom /cdro

2. grep Command
Command to recursively grep for a pattern in a directory => find . xargs grep pattern



Posted by Krishna Kishore Koney
Labels: UNIX OPERATING SYSTEM
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

The Verge - YOUTUBE

Loading...

Microsoft Research

Loading...

Hugging Face - Blog

Loading...

AI at Wharton

Loading...

Stanford Online

Loading...

MIT OpenCourseWare - YOUTUBE

Loading...

NPTEL IISC BANGALORE - YOUTUBE

Loading...

HackerRank - YOUTUBE

Loading...

FREE CODE CAMP - YOUTUBE

Loading...

BYTE BYTE GO - YOUTBUE

Loading...

GAURAV SEN INTERVIEWS - YOUTUBE

Loading...

Tanay Pratap - YOUTUBE

Loading...

Ashish Pratap Singh - YOUTUBE

Loading...

Kantan Coding - YOUTUBE

Loading...

SUCCESS IN TECH INTERVIEWS - YOUTUBE

Loading...

IGotAnOffer: Engineering - YOUTUBE

Loading...

DEEPLEARNING AI - YOUTUBE

Loading...

MIT News - Artificial intelligence

Loading...
My photo
Krishna Kishore Koney
View my complete profile
" It is not the strongest of the species that survives nor the most intelligent that survives, It is the one that is the most adaptable to change "

View krishna kishore koney's profile on LinkedIn


Failure is not falling down, it is not getting up again. Success is the ability to go from failure to failure without losing your enthusiasm.

Where there's a Will, there's a Way. Keep on doing what fear you, that is the quickest and surest way to to conquer it.

Vision is the art of seeing what is invisible to others. For success, attitude is equally as important as ability.

Monthly Blog Archives

  • ▼  2026 (3)
    • ▼  March (3)
      • Agentic AI: Agent-to-Agent Communication
      • Agentic AI Security
      • Agentic AI Overview
  • ►  2025 (4)
    • ►  October (1)
    • ►  August (1)
    • ►  May (1)
    • ►  April (1)
  • ►  2024 (18)
    • ►  December (1)
    • ►  October (2)
    • ►  September (5)
    • ►  August (10)
  • ►  2022 (2)
    • ►  December (2)
  • ►  2021 (2)
    • ►  April (2)
  • ►  2020 (17)
    • ►  November (1)
    • ►  September (7)
    • ►  August (1)
    • ►  June (8)
  • ►  2019 (18)
    • ►  December (1)
    • ►  November (2)
    • ►  September (3)
    • ►  May (8)
    • ►  February (1)
    • ►  January (3)
  • ►  2018 (3)
    • ►  November (1)
    • ►  October (1)
    • ►  January (1)
  • ►  2017 (2)
    • ►  November (1)
    • ►  March (1)
  • ►  2016 (5)
    • ►  December (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2015 (15)
    • ►  December (1)
    • ►  October (1)
    • ►  August (2)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  January (2)
  • ►  2014 (13)
    • ►  December (1)
    • ►  November (2)
    • ►  October (4)
    • ►  August (5)
    • ►  January (1)
  • ►  2013 (5)
    • ►  September (2)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2012 (19)
    • ►  November (1)
    • ►  October (2)
    • ►  September (1)
    • ►  July (1)
    • ►  June (6)
    • ►  May (1)
    • ►  April (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2011 (20)
    • ►  December (5)
    • ►  August (2)
    • ►  June (6)
    • ►  May (4)
    • ►  April (2)
    • ►  January (1)
  • ►  2010 (41)
    • ►  December (2)
    • ►  November (1)
    • ►  September (5)
    • ►  August (2)
    • ►  July (1)
    • ►  June (1)
    • ►  May (8)
    • ►  April (2)
    • ►  March (3)
    • ►  February (5)
    • ►  January (11)
  • ►  2009 (113)
    • ►  December (2)
    • ►  November (5)
    • ►  October (11)
    • ►  September (1)
    • ►  August (14)
    • ►  July (5)
    • ►  June (10)
    • ►  May (4)
    • ►  April (7)
    • ►  March (11)
    • ►  February (15)
    • ►  January (28)
  • ►  2008 (61)
    • ►  December (7)
    • ►  September (6)
    • ►  August (1)
    • ►  July (17)
    • ►  June (6)
    • ►  May (24)
  • ►  2006 (7)
    • ►  October (7)

Blog Archives Categories

  • .NET DEVELOPMENT (38)
  • 5G (5)
  • AI (Artificial Intelligence) (14)
  • AI/ML (9)
  • ANDROID DEVELOPMENT (7)
  • BIG DATA ANALYTICS (6)
  • C PROGRAMMING (7)
  • C++ PROGRAMMING (24)
  • CAREER MANAGEMENT (6)
  • CHROME DEVELOPMENT (2)
  • CLOUD COMPUTING (45)
  • CODE REVIEWS (3)
  • CYBERSECURITY (12)
  • DATA SCIENCE (4)
  • DATABASE (14)
  • DESIGN PATTERNS (9)
  • DEVICE DRIVERS (5)
  • DOMAIN KNOWLEDGE (14)
  • EDGE COMPUTING (4)
  • EMBEDDED SYSTEMS (9)
  • ENTERPRISE ARCHITECTURE (10)
  • IMAGE PROCESSING (3)
  • INTERNET OF THINGS (2)
  • J2EE PROGRAMMING (10)
  • KERNEL DEVELOPMENT (6)
  • KUBERNETES (19)
  • LATEST TECHNOLOGY (21)
  • LINUX (9)
  • MAC OPERATING SYSTEM (2)
  • MOBILE APPLICATION DEVELOPMENT (14)
  • PORTING (4)
  • PYTHON PROGRAMMING (6)
  • RESEARCH AND DEVELOPMENT (1)
  • SCRIPTING LANGUAGES (8)
  • SERVICE ORIENTED ARCHITECTURE (SOA) (10)
  • SOFTWARE DESIGN (13)
  • SOFTWARE QUALITY (5)
  • SOFTWARE SECURITY (23)
  • SYSTEM and NETWORK ADMINISTRATION (3)
  • SYSTEM PROGRAMMING (4)
  • TECHNICAL MISCELLANEOUS (32)
  • TECHNOLOGY INTEGRATION (5)
  • TEST AUTOMATION (5)
  • UNIX OPERATING SYSTEM (4)
  • VC++ PROGRAMMING (44)
  • VIRTUALIZATION (8)
  • WEB PROGRAMMING (8)
  • WINDOWS OPERATING SYSTEM (13)
  • WIRELESS DEVELOPMENT (5)
  • XML (3)

Popular Posts

  • Windows Shutdown Messages/Events : WM_QUERYENDSESSION, WM_ENDSESSION
  • Windows User-Mode Driver Framework (UMDF) ..
  • Windows FileSystem Mini Filter Driver Development
  • Cross Platform Audio(sound) Libraries ..

My Other Blogs

  • Career Management: Invest in Yourself
  • A la carte: Color your Career
  • Attitude is everything(in Telugu language)
WINNING vs LOSING

Hanging on, persevering, WINNING
Letting go, giving up easily, LOSING

Accepting responsibility for your actions, WINNING
Always having an excuse for your actions, LOSING

Taking the initiative, WINNING
Waiting to be told what to do, LOSING

Knowing what you want and setting goals to achieve it, WINNING
Wishing for things, but taking no action, LOSING

Seeing the big picture, and setting your goals accordingly, WINNING
Seeing only where you are today, LOSING

Being determined, unwilling to give up WINNING
Gives up easily, LOSING

Having focus, staying on track, WINNING
Allowing minor distractions to side track them, LOSING

Having a positive attitude, WINNING
having a "poor me" attitude, LOSING

Adopt a WINNING attitude!

Total Pageviews

Who am I

My photo
Krishna Kishore Koney

Blogging is about ideas, self-discovery, and growth. This is a small effort to grow outside my comfort zone.

Most important , A Special Thanks to my parents(Sri Ramachandra Rao & Srimathi Nagamani), my wife(Roja), my lovely daughter (Hansini) and son (Harshil) for their inspiration and continuous support in developing this Blog.

... "Things will never be the same again. An old dream is dead and a new one is being born, as a flower that pushes through the solid earth. A new vision is coming into being and a greater consciousness is being unfolded" ... from Jiddu Krishnamurti's Teachings.

Now on disclaimer :
1. Please note that my blog posts reflect my perception of the subject matter and do not reflect the perception of my Employer.

2. Most of the times the content of the blog post is aggregated from Internet articles and other blogs which inspired me. Due respect is given by mentioning the referenced URLs below each post.

Have a great time

My LinkedIn Profile
View my complete profile

Aryaka Insights

Loading...

Reid Hoffman - YOUTUBE

Loading...

Martin Fowler's Bliki - BLOG

Loading...

The Pragmatic Engineer

Loading...

AI Workshop

Loading...

CYBER SECURITY - YOUTUBE

Loading...

CYBER SECURITY FUNDAMENTALS PROF MESSER - YOUTUBE

Loading...