# Interview Topics

Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector. Usage which.min(x) which.max(x) x <- c( 1, 4, 3, 9, 6, 7) which.max(x) Output: \$Rscript main.r 4 # position {Or} Position particular number(another way) x Output: ...

#### Find the position of minimum and maximum of value in R Programming Language

Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector. Usage which.min(x) which.max(x) x <- c( 1, 4, 3, 9, 6, 7) which.max(x) Output: \$Rscript main.r 4 # position {Or} Position particular number(another way) x Output: ...

x <- c(2 ,3 ,4 ,6,1) min(x) y <- c(78,34,5,67,41,33) max(y) Output: \$Rscript main.r 1 78

#### Find the maximum and minimum number in R Programming Language

x <- c(2 ,3 ,4 ,6,1) min(x) y <- c(78,34,5,67,41,33) max(y) Output: \$Rscript main.r 1 78

x <- c(2 ,3 ,4 ,4) y <-c(3, 4 ,5 ,6) print (x+y) print(x-y) print(x*y) print(x/y) print(x%%y) print(x^y) or sum(x,y) prod(x,y) Output: \$Rscript main.r 5 7 9 10 -1 -1 -1 -2 6 12 20 24 0.6666667 0.7500000 0.8000000 0.6666667...

#### Write a R Program to Two vector Variables (Addition, Subtraction, Multiplication, Division, Mod, Coefficient)

x <- c(2 ,3 ,4 ,4) y <-c(3, 4 ,5 ,6) print (x+y) print(x-y) print(x*y) print(x/y) print(x%%y) print(x^y) or sum(x,y) prod(x,y) Output: \$Rscript main.r 5 7 9 10 -1 -1 -1 -2 6 12 20 24 0.6666667 0.7500000 0.8000000 0.6666667...

2+3 //Add 2-3 //Sub 2*3 //Mul 2/3 //Div 2+2+3*4-4/3 // Add, Mul, Sub, Div Output: 5 -1 6 0.6666667 14.66667 (Or) With input variable: x=6 y=2 x + y x-y x*y x/y Output: 8 4 12 3

#### R Programs to Add, Sub, Mul, and Div

2+3 //Add 2-3 //Sub 2*3 //Mul 2/3 //Div 2+2+3*4-4/3 // Add, Mul, Sub, Div Output: 5 -1 6 0.6666667 14.66667 (Or) With input variable: x=6 y=2 x + y x-y x*y x/y Output: 8 4 12 3

First R Program: print (“Hello world!”) Output: “Hello world!” print (“Hello World!”, quote-FALSE) Output: Hello World! print (paste (“Welcome”,”to”,”my”, “first”,”program”)) Output: “Welcome to my first program”

#### Simple way:” Hello world program in R”

First R Program: print (“Hello world!”) Output: “Hello world!” print (“Hello World!”, quote-FALSE) Output: Hello World! print (paste (“Welcome”,”to”,”my”, “first”,”program”)) Output: “Welcome to my first program”

ASCII Value of ALL characters #include <stdio.h> int main() { int i; for(i=0;i<255;i++) { printf(“ASCII value of character %c=%d\n”,i,i); } return 0; } Output: ASCII value of character =0 ASCII value of character =1 ASCII value of character =2 ASCII value of character =3...

#### Write a C program ASCII values of all Characters

ASCII Value of ALL characters #include <stdio.h> int main() { int i; for(i=0;i<255;i++) { printf(“ASCII value of character %c=%d\n”,i,i); } return 0; } Output: ASCII value of character =0 ASCII value of character =1 ASCII value of character =2 ASCII value of character =3...

Only ASCII values #include <stdio.h> int main() { int i; char ch; for(i=0;i<256;i++) { printf(“%c”,ch); ch=ch+1; } return 0; } Output: ¬ !”#\$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ^_` abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñÑª º¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐ └┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■

#### Write a C Program to Only ASCII values

Only ASCII values #include <stdio.h> int main() { int i; char ch; for(i=0;i<256;i++) { printf(“%c”,ch); ch=ch+1; } return 0; } Output: ¬ !”#\$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ^_` abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñÑª º¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐ └┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■

#include <stdio.h> int main() { char ch; printf(“Enter the character”); scanf(“%c”,&ch); printf(“ASCII value of %c=%d”,ch,ch); return 0; } Output: Enter the character O ASCII value of O=79

#### Write a C Program to ASCII value of a Character:

#include <stdio.h> int main() { char ch; printf(“Enter the character”); scanf(“%c”,&ch); printf(“ASCII value of %c=%d”,ch,ch); return 0; } Output: Enter the character O ASCII value of O=79