Posts

{CODE } Instructions & Operators (Chapter 2)

 1. Type Declaration Instructions #include<stdio.h> int main() { int age = 22; int oldAge = age; int newAge = oldAge + 2; printf("new age is : %d", newAge); int rupee = 1, dollar; dollar = 74; /* order of declaration is important - Wrong Declaration Order float pi = 3.14; float area = pi * rad * rad; float rad = 3; */ // valid declaration int age1, age2, age3; age1 = age2 = age3 = 22; //invalid //int a1 = a2 = a3 = 22; return 0; } 2. Arithmetic Instructions #include<stdio.h> int main() { int a = 1, b = 2, c = 3; //valid a = b + c; //invalid // b + c = a; printf("%d \n", 3 % 2); printf("%d \n", -3 % 2); return 0; } > Type Conversion #include<stdio.h> int main() { printf("sum of 2 & 3 : %d", 2 + 3); printf("sum of 2.0 & 3 : %f", 2.0 + 3); printf("sum of 2.0 & 3.0 : %f", 2.0 + 3.0); return 0; } > Associativity #include<stdio.h> int main() { printf(" Output : %d", 5+2/2*3); retur...

Loop Control Statements (C Programming)

Image
 * Loop Control Statements :- 1. For Loop

Practice Questions (C Programming)

Image
  Sol -

Conditional Statements (C Programming)

Image
 Conditional Statements : 1:   If Else    eg:  Conditional Operator : Ternary : eg  Switch : eg  #include <stdio.h> int main () { int day ; // 1- mon ; 2- tues ; 3 wed printf ( "enter day(1-7) : " ) ; scanf ( "%d" , & day) ; switch (day) {     case 1 : printf ( "monday \n " );     break ;     case 2 : printf ( "tuesday \n " );     break ;     case 3 : printf ( "wednesday \n " ) ;     break ;     case 4 : printf ( "thrusday \n " ) ;     break ;     case 5 : printf ( "friday \n " );     break ;     case 6 : printf ( "saturday \n " ) ;     break ;     case 7 : printf ( "sunday \n " );     break ;     default : printf ( "not a valid day \n " ) ; } return 0 ;     } eg : #include <stdio.h> int main () { int number; printf ( "entar a number :" ); s...

2.2 OPERATORS :( C PROGRAMMING )

Image
Operators : • Operator Precedence : b. Relational operators eg. C : Logical Operators D : Assignment Operators   check notes too...  

2.1 Instructions ( C PROGRAMMING )

Image
Instructions : 1.  Types Declaration Instructions :      Invalid :        Valid : 2 : Arithmetic Instruction : e.g agar power use karna hai toh : practical : #include <stdio.h > #include <math.h> int main () { int b, c ; b = c = 1 ; int a = b + c  ; int power = pow (b,c); printf ( "%d , " , power) ; return 0 ; } Modular operator : eg   type convertor   Operator Precedence    nicchey wale example ke case ke liye : 3. Control Instructions

'Import-Module PSReadLine'. (setting)

'Import-Module PSReadLine' How to fix this issue in vs code ?? -- Mohit.  'Import-Module PSReadLine'. Add-Type -TypeDefinition ' using System; using System.ComponentModel; using System.Runtime.InteropServices; public static class ScreenReaderFixUtil { public static bool IsScreenReaderActive() { var ptr = IntPtr.Zero; try { ptr = Marshal.AllocHGlobal(sizeof(int)); int hr = Interop.SystemParametersInfo( Interop.SPI_GETSCREENREADER, sizeof(int), ptr, 0); if (hr == 0) { throw new Win32Exception(Marshal.GetLastWin32Error()); } return Marshal.ReadInt32(ptr) != 0; } finally { if (ptr != IntPtr.Zero) { Marshal.FreeHGlobal(ptr); } } } public static void SetScreenReaderActiveStatus(bool isActive) ...