This site works best with JavaScript enabled
Sign In
Discussions
Activity
Sign In
Previous Results
malloc and the fork
I was executing a code given in the notes, but I thinke there's some more to add into it:-define _GNU_SOURCE
#include
#include
#include
#include
#include
#define CHILD 1
#define PARENT 2
#define WORK_ON_MEM(PROCESS, loc, g)
do
{
if(…
by
gaurav133232
March 2023
Pravjot Sir Classes
permalink
Infinite loop
Iam getting infinite loop while executing the code:-#include
#include
#include
#include
#define MaxStudents 100
#define MaxNameLength 30
#define MaxNameBuffer MaxNameLength+1
typedef struct{
int age;
char gender;
char name[MaxNameBuffer];
…
by
gaurav133232
January 2023
Pravjot Sir Classes
permalink
Interview Questions: Project 05
what is the difference between TYPEDEF & #DEFINE ???
by
sharavanraj209
December 2021
005 Character Device Drivers Development
permalink
Multiple Data Compression and Encryption using Iterative Technique, 120
use rm -f *.c,v command for delete the RCS file . and .h file extension not genrate the objective file because in .h file declare the sevral function and define the macros and global variable etc. so conclusion that you are use headerfile in…
by
gktejvan100
May 2021
001 C Programming, Data Structures
permalink
47.Data Structures. Queues
@deepak4u106 he already used "extern storage class" during declaring the function in declaration.h but for allocating them memory he has to define this functions without extern in main.c or init.c .
by
jyotipandey9813
May 2021
001 C Programming, Data Structures
permalink
23.Secondary Data Types-Strings
sir string mai user define string length is 16 character. but actual me string length 18 show hoota hai aisa kyu.
by
ayushdhiman117
May 2021
001 C Programming, Data Structures
permalink
02.03.Character Device Registration Initialization
Character Device Registration & Initialization :1 : Register Device : Registering the new device means provide major no. to it .The major number is provided by kernel. There are basically two way of registering the new device to the system a.)St…
by
jyotipandey9813
April 2021
005 Character Device Drivers Development
permalink
Introduction to C programming
Build process in C program
There are mainly 4 steps in which the full build proccess occurs in the C program.
1. Pre-processor
2. Compiler
3. Assembly
4. Linking
1. Pre-processor
It include header file code in the source file.
a) It takes …
by
deepak4u106
March 2021
001 C Programming, Data Structures
permalink
08.Control Structures. Loops and Iterations
Print all the number in digits.#include
int main(){ long long num; int temp; printf("Enter the number to find the digits\n"); scanf("%lldd", &num); while(num > 0){ temp = num % 10; …
by
deepak4u106
January 2021
001 C Programming, Data Structures
permalink
How C Programs Run?
What does compilation means?Compilation is a process in which any source code is converted into an object code with the help of a compiler. While compiling a source code which is let say a C program, the compiler will generate some files which are o…
by
bhatnagarashish1998
January 2021
001 C Programming, Data Structures
permalink
Introduction to C programming
Build process in
C program
There are mainly 4
steps in which the full build process occurs in the C program.
1. Pr-processor
2. Compiler
3. Assembly
4. Linking
1. Pr-processor
It
include header f…
by
deepak4u106
January 2021
001 C Programming, Data Structures
permalink
02.03.Character Device Registration Initialization
Hi sir ,I run application with driver as below step-
step 1- Compile Application & driver successfully
step 2- insmod kernel driver success. and major id 237 for this driverstep 3 -check dmesg print as per expected & create mknode for maj…
by
niranjan
December 2020
005 Character Device Drivers Development
permalink
16-17-IPC using Shared Memory
I have problems in shmat its giving shmat failed while executing the code , there is no compile time error. I attached code below
#include #include
#include
#include
#include
#include
#define mem_size 1024
int main()
{
…
by
abdulrehmanjmi
July 2020
003 Linux System Programming
permalink
Binary Search
output:ani@ani-VirtualBox:~/share_data/project/P01_C_project/s06_array$ ls
arryPointer binarySearch.o creatArray.o displayArray.o exitFunc.o linearSearch.c main.c mainMenu.o Makefile
binarySearch.c creatArray.c displayArray.c …
by
niranjan
May 2020
001 C Programming, Data Structures
permalink
Character Device Driver from Scratch
the answer of above bug container_of issue is it's kernel issue not an code issue
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member)…
by
nikeshkumarvedik
May 2020
005 Character Device Drivers Development
permalink
Character Device Driver from Scratch
Facing error while compiling
[root@localhost file_operation]# makemake -C /lib/modules/5.2.17-200.fc30.x86_64/build M=/home/nikesh/device_driver/file_operation modulesmake[1]: Entering directory '/usr/src/kernels/5.2.17-200.fc30.x86_64' …
by
nikeshkumarvedik
May 2020
005 Character Device Drivers Development
permalink
Character Device Driver from Scratch
headers.hMODULE_LICENSE("GPL");MODULE_AUTHOR("Ramans");
declerations.h#define DDNAMEextern dev_t devid;extern unsigned int majorNo, minorNo, nod;
init.h// extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const c…
by
spatlou
May 2020
005 Character Device Drivers Development
permalink
Character Device Driver from Scratch
My device driver is working proper. But i am facing a warning message while compiling the driver
Please See:
make[1]: Entering directory '/usr/src/kernels/linux-5.5.10' CC [M] /home/fedora/Desktop/Driver_File/10.writemap/init.o CC [M]…
by
dhananjay.patel
April 2020
005 Character Device Drivers Development
permalink
Interview Questions: Project 05
first we take extern int some variable then we define it in the init function in which alloc_chardev_region() is used to register device and initialize it with their respective macros and use the global variable as an argument in alloc_chrdev_region…
by
utkarshraj273
January 2020
005 Character Device Drivers Development
permalink
error
12 : In C and C++ We cannot define ''main fuction'' with Void Return type because it is called by operating system as soon as you execute your program to create a new process.
So your OS is Caller and it needs a return value.
0…
by
ashrafumair21
June 2019
Pravjot Sir Classes
permalink
Powered by
Vanilla
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership