Search:

Type: Posts; User: rmsece; Keyword(s):

Search: Search took 0.08 seconds.

  1. Answers
    0
    Views
    1,718

    Environment Variables

    Hi Everyone,
    Can you tell me what is the exact usage of environment variables in windows? Why do we require? How does operating system make use of those variables? When we install an...
  2. Answers
    3
    Views
    956

    Re: Recursion Program Example

    #include<stdio.h>
    #include<conio.h>
    int main()
    {
    static int i=0;
    i++;
    if(i<101)
    {
    printf("%d\n",i);
    main();
  3. Answers
    0
    Views
    1,361

    string and stringBuilder

    Hi all,
    Can anyone tell what is the use of string class over stringBuilder? Even,static strings can be handled by stringBuilder. Obviously,since string class is immutable,we are going for...
  4. Answers
    1
    Views
    1,009

    Re: Program Condition

    The question is wrong. else(condition) is impossible, it should be

    if(condition)
    printf("hello");
    else
    printf("world");

    My answer is:
    condition : (!(printf("hello")); printf returns...
  5. Answers
    9
    Views
    2,210

    Re: Programming Challenge Problem #03

    Hi morla,
    Your answer is correct,But think about the time taken for the execution...If we give some large input to the program(5 digits),the loop subtracts 9 from the number till it...
  6. Answers
    2
    Views
    1,036

    Re: Programming Challenge #05

    hi aman,
    it will be 601 and 506...In (i), for every value of row,inner loop checks condition for 6 times (5 times column value gets satisfied,last time failed)...so,totally 100*6=600...After...
  7. Answers
    5
    Views
    1,235

    Re: Programming Challenge #04

    1344 is the right answer...alokkrbhatt's approach is correct. But,the array starts with [1][1] instead of
    [0][0],so he missed to arrive the right answer... Think in terms of rows and...
  8. Answers
    9
    Views
    2,210

    Re: Programming Challenge Problem #03

    Try this...Enter number,number should be greater than 0...

    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    int d;
    void main()
    {
    char *num;
    clrscr();
  9. Re: creating a program loop without using for loop

    try this...recursive program,if is conditional statement and not a loop,so u could use this probably...



    void main()
    {
    static int i=1;
    if(i<=10)
    {
    printf("%d ",i);
  10. Answers
    2
    Views
    1,844

    Re: round to highest number (hel)

    dim a as double=1.00001
    dim b as double
    b=math.ceiling(a)
    MsgBox(b)

    regards,
    rms...
  11. Answers
    7
    Views
    7,582

    Re: Circle in linked list

    You can have two pointers p,q pointing to the header node...Inside a while loop you move the second pointer by two nodes and first pointer by one node...if loop exists,definitely the two pointers...
  12. Thread: for loop

    by rmsece
    Answers
    4
    Views
    1,361

    Re: for loop

    assume n numbers in both sets a and b(array is taken as a set,so,two arrays)...a and b are the sets...c is the resultant set...
    for(i=0;i<=n-1;i++)
    {
    c[i]=a[i]*b[i]
    }
    regards,
    rms...
  13. Thread: funtion swap

    by rmsece
    Answers
    9
    Views
    1,895

    Re: funtion swap

    Hi,The second way will not work properly when the variables a or b equal to zero,another one problem is that if "a*b" exceeds integer range, it will give unexpected results.
  14. Thread: funtion swap

    by rmsece
    Answers
    9
    Views
    1,895

    Re: funtion swap

    ya,correct,its for integer variables only...But we dont use temporary varibles explicitly...
  15. Re: find big no between 2 using 3 variables in cpp

    why do you need three variables? you can do it in two variables itself...

    cout<< ( (a>b)*a + (b>a) *b)
    cout <<"is big"
  16. Thread: funtion swap

    by rmsece
    Answers
    9
    Views
    1,895

    Re: funtion swap

    fine...you can use a single statement to swap two numbers without the use of temporary variable...

    a^=b^=a^=b

    regards rms...
  17. Answers
    3
    Views
    1,460

    Re: Muliplications of two numbers

    without operators impossible...use this logic for small positive numbers...It needs just 16 iterations,repeated addition will take some time...so this one is good...a and b are two inputs,sum is the...
  18. Answers
    14
    Views
    29,225

    Re: Print 2nd largest value from array

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int a[15];
    int i,j,n;
    scanf("&#37;d",&n); /* size of the array */
    for(i=0;i<n;i++)
    scanf("%d",a[i]);
    for(i=0;i<=-1;i++)
Results 1 to 18 of 18
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact