This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main() | |
| { | |
| int count, i, j, temp; | |
| int *array, *elements, *counts; | |
| char dictionary[100][100]; | |
| printf("Enter total number of elements: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace Swapper | |
| { | |
| class Program | |
| { | |
| private const char NoMatchChar = '#'; | |
| private static readonly List<char> AltcharsList = new List<char> { 'A', 'B', 'C', 'D', 'E' }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace Swapper | |
| { | |
| class Program | |
| { | |
| private const char NoMatchChar = '#'; | |
| private static readonly List<char> AltcharsList = new List<char> { 'A', 'B', 'C', 'D', 'E' }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Create the following table : STUDENT | |
| Column Name Data Type Size Constraints | |
| RegNo Varchar2 6 Not null | |
| RollNo Number 6 Not null | |
| Name Varchar2 10 Not null | |
| Address Varchar2 15 Not null | |
| PhoneNo Number 10 | |
| YearOfAdm Number 4 Not null | |
| DeptCode Varchar2 4 Not null | |
| Year Number 1 Not null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Invert a number | |
| declare | |
| num1 number(5); | |
| num2 number(5); | |
| rev number(5); | |
| begin | |
| num1:=123; | |
| dbms_output.put_line('Original: '||num1); | |
| rev:=0; | |
| while num1>0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Add two numbers | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage - $0 x y" | |
| echo " Where x and y are two nos for which I will print sum" | |
| exit 1 | |
| fi | |
| echo "Sum of $1 and $2 is `expr $1 + $2`" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Print Process Info and shits | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| int main() | |
| { | |
| printf("Process ID of current process = %d\n",getpid() ); | |
| printf("Process ID of parent process = %d\n",getppid() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #include <netdb.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #include <netdb.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.net.InetAddress; | |
| import java.util.Scanner; | |
| public class Ping | |
| { | |
| public static void main(String[] args) | |
| { | |
| String address; | |
| Scanner sc = new Scanner(System.in); | |