C Learning
C Learning
int a=3;
a=5;
IntergerConstant :
Ex.: 426
+782
-8000
-7605
int si, m_hra ;
float basal ;
char code ;
Char z=’A’
Keyword=if/else/while etc
1. Only result
To make the program general the program itself should ask the user to supply the values of p, n and r
through the keyboard during execution. This can be achieved using a function called scanf( ).This
function is a counter-part of the printf( ) function. printf( ) outputs the values to the screen whereas
scanf( ) receives them from the keyboard. This is illustrated in the program shown below
● Declare variable at 1st :
● Data Analysis
bits vs compliers size
Let say our compiler is 16bits means every things will be 16 bits
integers :(4)
Character :(1)
1 byte data
Decimal Number
Type of variable
1)Local :scope only inside the function where its defined . Initialize inside of any function
2)Global: scope is every where in all function. Initialize outside of any function .
2nd fun () call ---> "static int a =10 "skipped . a become 12 and print 12
3nd fun () call ---> "static int a =10 "skipped . a become 13 and print 13
static function
All the function defined in C are global by default(one file's function can call another file's function ). If
we mention static before a function then that function will not be accessible from another file .It can
only accessible from the file where it written
Key:
Int to float :
Int(4.5)=4
Float to int:
Float(5)=5.00
k is an integer variable and a is a real variable.
But
Int A;
A=(2.4*4.5)/6;
It convert to int as 1
So int A=1;
Example2:
int a=1;
float b=1.000
if(a==b)
printf("HI");
output ? Ans is HI
Here when we say a (it is int )=b (it is float).Here b converter to int and become 1 and thus a==b
satisfied.
int-char conversion
int a=65;
char c;
c=65 Line1
//In Line1 65 will be consider as ASCII and ascii charact of 65which is A will store. Thus c hold 'A'
int a;
char k='B';
a=k Line1
Arithmetic Operation
y*=7--->y=y*7
y+=67--->y=y+67
Steps
1)First find out the Highest priority operator AND perform its task and then next priority operator task
2)If two operator has same priority then see the associatively and perform L-->R or R-->L
Example1:
a=3*4%5/2
Here *,%,/ has same priority .So see the associatively which is L to R.So perform Left to Right
a=((3*4)%5)/2=1
Example2
Type casting
Converting one datatype to another
Decision Control:
● If statement:
Different style of conditions
a.if (3+2)
printf("cool")
b. : if (2==5)
printf("cool")
----------------------------------------------
● If-else statement :
● Nested if-else:
● Ladder if else
● A Word of Caution
We put i=100
Correct : if(i==5)
● Ternary Operator :
-----------------
Loop
While
Infinite while loop:
● Range of integer -2^n to 2^(n-1).Here we assume our complier is 16 bit. So n=16.Max integer can
hold is 32767.Once i reach 32767 and then increment then 32767+1 it's become which falls
outside the valid integer range, so it goes to other side and becomes -32768 which
would certainly satisfy the condition in the while. This process goes on indefinitely
● Here we put a ";" after while
Incremental/Decrement Operator :
● i++🡪i=i+1
● i+=2 ----------🡪i=i+2;
for Loop:
Point 1:
It is important to note that the initialization, testing and incrementation part of a for loop can be
replaced by any valid expression.
Point 2:
initialization, testing and incrementationcan be done out of for
●
Point 3:
● By do-while loop:
● By for loop:
● By while
Break
In a loop once break seen, control come out of that loop.it always associate with if
--------------------------------------------------------------------------------
Continue:
Once continue encounter then lower part of the continue does not execute and control goes to for ( j = 1 ;
j <= 2 ; j++ )
Do-while loop:
1st execute the body and then check the condition
Example :
Pattern Design :
https://www.youtube.com/watch?v=6irHnysGbSI
pattern1:
my code :
#include<stdio.h>
int main(){
inti,j,a=1,p;
for(i=1;i<=p;i++)
{
printf("\n");
for(j=1;j<=p-i;j++)
{
printf(" ");
}
for(j=1;j<=a;j++)
{
printf("*");
}
a=a+2;
for(j=1;j<=p-i;j++)
{
printf(" ");
}}
printf("\n");
printf("\n");
printf("\n");
printf("\n");
}
Output:
Pattern2 :
#include<stdio.h>
int main(){
inti,j,a=0,k,m;
for(i=1;i<=4;i++)
{
printf("\n");
printf("\n");
for(j=1;j<=5-i;j++)
{
printf(" ");
}
printf("*");
for(k=1;k<=a;k++)
{
printf(" ");
}
if(i==1)
{
a=1;
}
else
{
a=a+2;
}
if(i!=1){
printf("*");
}
for(j=1;j<=4-i;j++)
{
printf(" ");
}
printf("\n");
printf("\n");
for(m=1;m<=9;m++)
{
printf("*");
}
Case Control Structure
Basics
Example
Tips and Traps:
1) impression that you get till now that u can use only cases arranged in ascending order, 1, 2, 3 and
default. You can in fact put the cases in any order you please
2) You are also allowed to use char values in case and switch as
In fact here when we use ‘v’, ‘a’, ‘x’ they are actually replaced by the ASCII values (118, 97, 120) of
these character constants.
3) Every statement in a switch must belong to some case or the other or always find some case only .
If a statement doesn’t belong to any case the compiler won’t report an error. However, the statement
would never get
executed. Switch always find out case within it
here "Hellow" will never print .
switch(i)
printf("Hellow)
4)We can use expression with constants/variable in switch expression .Below are valid
if-else is slower than case ,but in case you can do limited task
5) If we have no default case, then the program simply falls through the entire switch and continues
with the next instruction (if any,) that follows the closing brace of switch.
7)Below is error free .We can write case under default as nested case
9)switch(x) and switch ((x)) same
10)Below will not through any error.within switch state its looking for case with 4
no o/p
11)What happened if break is not mentioned ?
first control go to 1 then run all the code below case1 until break is not enountered
same as
goto statement transfers control to the label ‘sos’, causing printf( ) following sos to be
executed.
The exit( ) function is a standard library function which terminates the execution of the program. It is
necessary to use this function since we don't want the statement
Function:
Add number :
#include<stdio.h>
summer(int);
main()
int x=0;
summer(x);
summer(int sum)
int a;
scanf("%d",&a);
sum=sum+a;
printf("Sum is : %d",sum);
printf("\n");
summer(sum);
KeyPoint:
3. A function can return only one value at a time. Below are invalid
4.Calling convention from right to left
Surprisingly, it outputs 3 3 1.
5.Library Function
Pointers:
Basics:
int i = 3 ;
int *j ;
j = &i ;
&i=address of i=65524;
j=&i;
that means j* is the value of the const in j where j is already holding a address;Also we can say that j*
indicate the value whose address is inside j .
More complex :
k=65522=Its a address
KeyPoint
● Pointer in function :
Main
Adder(input,input,&output);
Pointer-------------------------------------------------🡪output
}}
Here when we call the function then we just pass the address of output variable .In the calling function
evaluate the output (z) and store the result into that output location .So no need to return .
Mane suppose amr barite ( B-11/209) ya sum ta store korte hobe .So ami calling function ya amr barir
address ta B-11/209 ya pathiya di66i.Bol6i je sum evaluate kore amr bari te rekhe dite
Example :
#include<stdio.h>
void adder(int,int,int*);
main()
inta,b,c;
scanf("%d",&a);
scanf("%d",&b);
adder(a,b,&c);
printf("sum is = %d",c);
*z=x+y;
Advantage :
1.no need of return ,we can print the output from called/calling function both
2.we are passing the address of output so this is known as call by reference .
Array:
● Basic Structure:
a[i]
All elements must be same type int or floats
● Array Initialization
Case1:
Case2:
● Reading data from Array:
Case1:
Int a[]={1,3,2,1,23}
a[2]=2;
a[3]=1
case2:
● Basics:
Type1:
Type2:
Type3:
Type 4:
Type1:
s[2][1]
* ( s[2] + 1 )
*(*(s+2)+1)
String:
● Basics:
Each character in the array occupies one byte of memory and the
last character is always ‘\0’.
Character --------‘a’
String -------------“HellowBoss”
To print anything string by %s then we have to pass the o index’s address of the string
Char name[25]=”Shuvankar”;
By pointer(name --🡪&name[0])
● Take and print data by %s
Name=&name[0]
o/p shuvankar
name=&name[0];
● Advantage of Pointer:
● we cannot assign a string to another, whereas, we can assign a char pointer to another char
pointer
● Also, once a string has been defined it cannot be initialized to another set of characters. Unlike
strings, such an operation is perfectly valid with char pointers.
● Use of Const:
● Library Function:
Key :Always pass base address of each row for both include and print
Data Include
● Type 1:(mention in code)
Memory allocation:
● Type 2:(take from input)
Memory allocation:
Disadvantage :
Sample code:
#include<stdio.h>
main()
{
char name[34][20];
int i;
printf("enter the name\n");
for(i=0;i<=4;i++)
{
scanf("\n%s",&name[i][0]);
}
printf("yoour name\n");
for(i=0;i<=4;i++)
{
printf("%s\n",&name[i][0]);
}
another example
● Pass 2D string to function
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void searchname ( char [][12] ,int ,int );
int main()
{
char name[4][12],searchnm[12];
int row=4,col=12,i;
{
printf ("Enter the %d Names",i);
scanf ("%s",&name[i][0]);
}
searchname(name,row,col);
}
{
printf ("Names are the %s Names ",p[i]);
2D String ;
Summary for Array and String:
Global variable :
https://www.youtube.com/watch?v=SZY-8d1Rzkw
global variable is permanent storage
File :
● Basics :
● Whenever we open a file then file came to buffer memory and then it work
● File must be kept where main c file are stored
● Once file came to buffer then its’ end with EOF.
Operation of Mode:
Open and Read File :
Read a file
● FILE *fp ;
● Char ch = fgetc ( fp ) ;
1.Infgets() we pass the address of charac which retrn the charac on that address and then we print .
Once we close the file we can no longer read from it using getc( ) unless we reopen the file. Note that
to close the file we don’t usethe filename but the file pointer fp. On closing the file the buffer
associated with the file is removed from memory.
Write in File:
Open file in
a mode=append the string (fp point to last address of charc in the text)
https://www.youtube.com/watch?v=sdkvKOvqwAA
when ever there is a different type of data present like int/char/string then we use .here in the file all the
datatypes are consider as charac or string .like 1234 it occupy 4byte as its string
fprintf( )=write data in file(open file in w mode)=just write the values in the variable in the
file(variable ---🡪file)
fscanf()=read from file.(open file in r mode)=just put the data from variable to file
fprintf:
fscanf:
(file--🡪variables)
Roll name are written in the file
Fscanf read the data from file and store in roll/name which we just print
Read/Write record of data:
A text file contains only textual information like alphabets, digits and special symbols. In actuality
the ASCII codes of these characters are stored in text files.
Key:
In text mode, a special character, whose ASCII value is 26, is inserted after the last character in the
file to mark the end of file. If this character is detected at any point in the file, the read function
would return the EOF signal to the program.
Binary File:
As against this, a binary file is merely a collection of bytes. This collection might be a compiled
version of a C program (say PR1.EXE), or music data stored in a wave file or a picture stored
in a graphic file.
Structures:
It's nothing but a concept of table where we can store data of different type
Or,
In memory:
not a structure variable but a pointer to a structure, and the dot operator requires a structure variable
on its left. In such cases C provides an operator ->, called an arrow operator to refer to the structure
elements. Remember that on the left hand side of the ‘.’ structure operator, there must always be a
structure variable, whereas on the left hand side of the ‘->’ operator there must always be a pointer to
a structure. The arrangement of the structure variable and pointer to structure in memory is
shown in the
Call by reference
Miscellaneous for Placement
Data Structure
Infix A+B operator in middle
Infix to prefix/postfix
2)If 2 operator has same priority then see the associatively and perform accordingly
There / and * has same priority .But associatively is L to R so we move L to R and evaluate the first
operator's operation which we encounter first while moving L to R.
Examples:
Infix expression calculation
https://www.youtube.com/watch?v=zl-iv3dLKIA
https://youtu.be/84BsI5VJPq4
Steps
1)First find out the Highest priority operator and perform its task and then next priority operator task
2)If two operator has same priority then see the associatively and perform L-->R or R-->L.when we move
L to R or vice versa then first operator we encounter from that same priority operator list will be
performed first .
Example1:
a=3*4%5/2
Here *,%,/ has same priority .So see the associatively which is L to R.So perform Left to Right
a=((3*4)%5)/2=1
Example
Prefix calculation cal
Steps
o/p=1
o/p=20
case2: typedef
Let we have very length data type which we have to repeat number of time .Using typedef we can
provide it's small nick name and use that nickname everywhere
exp1
exp2
We can also define global variable before main
int a=23;
float y=8.09
char name[20];
So 17 bit is wastage
Malloc:
Return : Base adress:if memory allocation successful
Here 10 block of 2 byte (int) is allocated and base address is returned in void pointer form void
pointer form
It return void pointer which we have to typecast .so it must be type casted to respective pointer .
Example1:
Key: Here we provide n from user .Means user as per user's requirement mem is allocating .
Calloc:
return base address with void pointer
Free()
Realloc()
Priority are
In C we can perform all binary operation
These operators can operate upon ints and chars but not on floats and doubles.
showbits()
showbits(5)=0000000000000101
Right shift
ch=11010111,
caution:
Left shift
data-------------------<< insert 0
5225=0001010001101001
Mixed of operation:
If so many operator is present then perform as per you did in inflex expression caculation
16^1=17(ans)
here due ++i i become 1 so second time loop will not execute
case6: macro
Steps of execution of any programming is as
Before compilation preprocessor execute the C code and run the macros
It globally declare that upper is 25
Type of variable
1)Local :scope only inside the function where its defined . Initialize inside of any function
2)Global: scope is every where in all function. Initialize outside of any function
2nd fun () call ---> "static int a =10 "skipped . a become 12 and print 12
3nd fun () call ---> "static int a =10 "skipped . a become 13 and print 13
Pointers
Pointers to 1D Array :
case1
int arr[]={23,4,6,7};
case2:
https://youtu.be/ibj_AKOxpHo?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
int a[5]={1,2,3,4,5}
int (*p)[5]=&a;
Here (*p)[5] indicate a whole 5 elements array at a single quantity .that single entity's base address is
same as a
o/p 1
case3:
int *p[5]
Case1:
https://youtu.be/3fOPOUnkcdQ?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
a[1] or *(a+1)--->1008
**(a+1)--->*a[1]--->a[1][0]----> 3
Case2:
case3:
int (*p)[2][3]={4,67,1,2,3,4};
*p point whole array as single quantity
Pointers to 3D Array :
s[2][1]
* ( s[2] + 1 )
*(*(s+2)+1)
https://youtu.be/3fOPOUnkcdQ?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
Pointers in String:
Pass base address of any string for print or scan
case1:
char name[5][25]={"Hellow","cool","oiii"};
case2:
In this declaration names[ ] is an array of pointers. It contains base addresses of respective names.
That is, base address of “akshay” is stored in names[0], base address of “parag” is stored in
names[1] and so on.
name[i] store the base address of i th name .
printf("%s",name[2])----> raman
Here we actually name[2] indicate base address of raman .for print we have to mention base address
Case3:
Pointers to Function :
https://youtu.be/BRsv3ZXoHto?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
1.int s[2][3]={{23,56},{45,23,56}}
2.
int a=90;
3.
int a[]={23,56,78,12,34};
int *p;
p=&a[0]
4. Remember
(*p)()--->point to a function
(*p)[][]--->point to a array
5.
its not a error but no o/p as switch always find out case only within it
12.Switch can't have same case value and case value must be constant
8.break always use in loop.If we mention outside of loop then error occur
6.
s[2][1]
* ( s[2] + 1 )
*(*(s+2)+1)
7.int arr[23]
Here 0 to 22th index elements will be 0 and after that garbeg values
8.every value in enum is 0 1 2 3 if not mentioned ..Its a array of any type data
9. ‘%u' treats the integer as unsigned, whereas ‘%d' treats the integer as signed.
10."%6.2f" meaning ?
Total digit allocated for whole float number . After .(dot) 2 digit will be taken AND remaining (6-2=4) will
be for before .(dot)
14.
15.
Here int x=010 indicate 10 is in octave =8 in decimal
16.
printf return number of charact it print
17.
All the function defined in C are global by default(one file's function can call another file's function ). If
we mention static before a function then that function will not be accessible from another file .It can
only accessible from the file where it written
18.
&4["Hellow"] means & *("Hellow" +4)
&4["Hellow"]---> & *(s+4)---. it will delete first 4 letter and print remaining-->ow
Also in a print statement only 1st arguments will be print .Others will be ignored
20. External variable are global variables with permanent(life time ) storage
****p meaning
25.Double pointer
Also if we write
16.
24.NULL pointers
https://youtu.be/oPScHNQDCkc
17.always convert address of element not convert element when needed
here char pointer hv to point a short data so address of a which is &a is type cast to char
pointer .p is also address
18.int arr[n]={23,45,12,3,40}
19.
#include "stdio.h"
int foo(int a)
{
---------
}
int main()
{
foo;
-
}
20. if u declare a pointer outside of any function (globally) then its default value is NULL
23. But a variable name has to start with either letter or underscore.
23.Remember below
o/p 0
24.starting with 0x is hexadecimal number
Ans -gh
similar way
Problem 90:
Problem34:
https://youtu.be/U8Ps0XSQdJw?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
Thus we got 15
Problem 89:
Problem 89:
&x=5
c=5
so x is 5 and c is 5
similar way
Ans =3024
Problem 35:
https://youtu.be/alEjARaJ-Fo?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
Ans 19
Problem 45:
https://youtu.be/Mgygikl0Ym8?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
Problem 89:
https://youtu.be/zt2Z8U_1kmw?list=PLBlnK6fEyqRggZZgYpPMUxdY1CYkZtARR
2356
Problem1
https://youtu.be/qzjgv1UKtQc?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
o/p=5
Here *p++ first p will be increment to 1004(let int is 4 byte) then value of *(1004) will be considered
but
Problem2:
https://youtu.be/_5N-ScdbAw4?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
output=6
Problem 3:
https://www.youtube.com/watch?v=u6LuwLuLSrM&list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF&index=3
8
o/p=error at ++a
Here ++ operator only work on variable ,not constant .So ++5 will give error
a=&a[0]=constant
Problem4:
https://youtu.be/lgG4RFfiNCs?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
30 30
A array is created
f1 print---------------------- 30
f2:
it also give 30
Key Point
int a[]={23,56,78,12,34};
int *p;
p=&a[0]
Problem 5:
1223
p[1][0]=1223
for %d
for %u
Problem 6:
https://youtu.be/LIL86pdKnY4?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
ans-800byte
Here p pointer point a matrix of [10][20] where p holding the base address of it .
int a;
int *p;
p=&a;
But in the question *p indicating a matrix of 10x20.Its size is 10*20*4=800(each element on that array is
int)
So sizeof(*p)=800
Problem 12
https://youtu.be/N9v27OKHimM?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
o/p-200 sq cm
*p--------------------------point---->unit()
Key
(*p)()--->point to a function
(*p)[][]--->point to a array
Problem 7:
https://youtu.be/aVO1nz6wZok
ans=11 byte
Problem 8:
https://youtu.be/bPzGScJJgbQ?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
ans - no swapping taken place
KeyPoint
Problem 16
https://youtu.be/GN6Vd0Oygm0?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
10 20
Problem 9:
https://youtu.be/JBBuXl6H1Sw?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
ans=4
so ptr=char*
Problem 10
https://youtu.be/TxwwpGclYm8?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
2+3*2+3
2+(3*2)+3
=11
Problem 11:
https://youtu.be/-5IPZIHAvIA?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Here *p is void pointer. Means p can hold address of any datatype.So what datatype he can point out is
not mentioned. So pointer will be confused how much data allocate .So there will be error in print .
Problem 13:
o/p 1 2
Problem 14:
o/p 35 19
x*=3+4
x=x*7=35
similar for y
Problem 15:
https://youtu.be/dEBZ3Fz2BmE?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
ans 2 1 0
see video
Problem 16
https://youtu.be/ek1A5w7IDpo?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
PAL
1000 1001 1002 1003 1004 1005 1006
B H O P A L '\0'
Here when we use %s then we pass base address .From base address to till get '\0' string printed
Problem 17
https://youtu.be/N30oLLPdEP4?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Ans -P
Problem 18
https://youtu.be/AxAtLgNW0Zg?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Ans 10 10 10
Problem 19
https://youtu.be/TvqKQ3fv3Kw?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Ans 4 2
Problem 20
8642
Problem 22
Ans -67
We can print any constant directly mentioning that rather mention variable always
Problem 21
https://youtu.be/6ux6VAtYUUY?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Ans-2
scanf always return num of "%d" or "%s" mention inside it .Here return value will be printed
Problem 22:
https://youtu.be/PeW1Y4Fndyc?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Problem 23:
https://youtu.be/oM3W3Unl8GQ?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
Ans 16 4 2
Problem 24:
https://youtu.be/4_qJEKb8YP8?list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF
ans 3
(x=3) performed
Problem 25:
ans 5
1st x assign to 3
1st x assign to 4
1st x assign to 5
Problem 26:
https://www.youtube.com/watch?v=JNgdGKODMVw&list=PL7ersPsTyYt3EtkX5jIpmfLddaYtBYsmF&index
=5
error come
Problem 27:
https://youtu.be/IY79fWYkiPQ
Ans 9
Problem 28:
https://youtu.be/mwmvfNVhIA4
All the function defined in C are global by default(one file's function can call another file's function ). If
we mention static before a function then that function will not be accessible from another file .It can
only accessible from the file where it written
Problem 30
o/p
&4["Hellow"]---> & *(s+4)---. it will delete first 4 letter and print remaining-->ow
Also in a print statement only 1st arguments will be print .Others will be ignored
Problem 31:
o/p 17
o/p 4
case1:
b>>=2*1++
as its post increment and also as per precedence ++ > * so first ++ should be work
But its post increment operator thus 2*1 performed first then c -->c+1only .
case2:
Problem 29:
Ans is not sure .Do it by u r self
Problem 32:
o/p C
check 4 and 12 of Case tips
Problem 33:
o/p HELLO AB EF
Problem 35:
External variable are global variables with permanent(life time ) storage
Problem 35:
Problem 37 :
consider
PROBLEM 39:
https://www.geeksforgeeks.org/predefined-macros-in-c-with-examples/
Problem 23:
o/p 17
addition or substraction of any char means its ASCCI are add aur subs
Problem 24:
at 47 location placing 47
Problem 24:
Problem 25:
Here size of array cann't be define from out side of function
Problem 90:
if u declare a pointer outside of any function (globally) then its default value is NULL
Problem 22:
initially s=0 when value was not assigned
Ans 6
Problem 78:
Here *r mean r is a pointer which holding a address of integer .
Problem 78:
Problem 78:
where is error
here num+num2<== num3 is a expression can have only 0 or 1 value .So cann't be -1 .So error at line 3
Problem 89:
from greekforgreek
Advance pointers
loops-controls-structures=only switch