Broadcom46 open jobs

Staff Software Engineer

Software engineeringPosted 5 weeks agofrom Broadcom's own hiring page

Work type
On-siteBengaluru
Experience
1–6 years
Pay
Not listedUsually ₹7.7–15 LPASoftware engineering, median at 1–9 years, in India (Payscale)
Posted
5 weeks ago
Before you apply: make your resume fit this job

Skills it mentions

Add your skills to see which ones you have.

Interview questions for this job6 with answers below, on Linux, C, C++ and 1 more

About the job

Please Note:

1. If you are a first time user, please create your candidate login account before you apply for a job. (Click Sign In > Create Account)

2. If you already have a Candidate Account, please Sign-In before you apply.

Job Description:

Role and Responsibilities:

Engineer would be responsible for building system software components running on Distributed Operating System.
The components would be part of the infrastructure and Application space. They can be user or kernel level components.
Should be able to troubleshoot and support the components for multiple parallel releases.
Should be able to work with technical teams across geographies, and various time zones.
Performance tuning of the components to meet the scalability requirements.
Work closely with the testing, documentation and customer support teams.

Skills required:


Must have a 4-year undergraduate degree, and Master’s degree preferred, with Major or Minor in Computer Science or Information Systems
Must have 1 to 6 years of work experience in a software product company. Should have worked on the Linux/Unix platforms, using C/C++ languages.
Should have knowledge of atleast one scripting language, preferable Python.
Should be able to resolve complex issues with strong analytical skills
Must be familiar with Software Development Life Cycle for a product that has multiple release streams, and must have gone through the software development process at least once in their past work experience
Must have good written and verbal communication skills to:
take requirement, develop external functional specs,  unit test plan, and implementation design specs

Broadcom is proud to be an equal opportunity employer.  We will consider qualified applicants without regard to race, color, creed, religion, sex, sexual orientation, national origin, citizenship, disability status, medical condition, pregnancy, protected veteran status or any other characteristic protected by federal, state, or local law.  We will also consider qualified applicants with arrest and conviction records consistent with local law.

If you are located outside USA, please be sure to fill out a home address as this will be used for future correspondence.

Interested?Staff Software Engineer at Broadcom

Apply on company site (opens in a new tab)

The job ad ends here

Interview questions for this job6 with answers, on Linux, C, C++ and 1 more

Interview questions for this job

For the skills the ad mentions: Linux, C, C++ and Python.

540 questions
  • How can I replace a string in a file(s)?Linux

    1. Replacing all occurrences of one string with another in all files in the current directory:

    These are for cases where you know that the directory contains only regular files and that you want to process all non-hidden files. If that is not the case, use the approaches in 2.

    All sed solutions in this answer assume the sed implementation from GNU, NetBSD, OpenBSD, ast-open which process the -i option the same way perl does. If using FreeBSD's sed implementation (as also found on macOS or DragonFly BSD), replace -i with -i ''. Also note that the use of the -i switch with any version of sed has certain filesystem security implications and is inadvisable in any script which you plan to distribute in any way.

    • Non-recursive, non-hidden files in this directory only:

      perl -i -pe 's/foo/bar/g' ./* 
      sed -i 's/foo/bar/g' ./*
      
    • Recursive, regular files (including hidden ones) in this and all subdirectories

      find . -type f -exec perl -i -pe 's/foo/bar/g' {} +
      find . -type f -exec sed -i 's/foo/bar/g' {} +
      

      If you are using zsh:

      perl -i -pe 's/foo/bar/g' ./**/*(D.)
      sed -i 's/foo/bar/g' ./**/*(D.)
      

      (may fail if the list is too big, see zargs to work around).

      Bash did add support for zsh's recursive globbing (though only working properly with regards to symlinks in 5.0 or newer) but can't check directly for regular files, a loop is needed (parenthesis avoid setting the options globally):

      ( shopt -s globstar dotglob
          for file in **; do
              if [[ -f $file && ! -L $file ]]; then
                  sed -i 's/foo/bar/g' "./$file"
              fi
          done
      )
      

      The files are selected when they are regular files (-f) excluding symlinks (-L) resolving to regular files like the other approaches above do (sed/perl would break symlinks).

    2. Replace only if the file name matches another string / has a specific extension / is of a certain type etc:

    • Non-recursive, files in this directory only:

      sed -i -- 's/foo/bar/g' *baz*    ## all files whose name contains baz
      sed -i -- 's/foo/bar/g' *.baz    ## files ending in .baz
      

      (using the -- option delimiter rather than ./ prefix works here as the filenames are guaranteed not to be - and makes the argument list shorter, less likely to break the system limit on the size of the arguments)

    • Recursive, regular files in this and all subdirectories

      find . -name '*baz*' -type f -exec sed -i 's/foo/bar/g' {} +
      

      If you are using zsh:

      sed -i -- 's/foo/bar/g' **/*baz*(D.)
      sed -i -- 's/foo/bar/g' **/*.baz(D.)
      

      If you are using bash 5.0+, adapt the loop above and replace ** with **baz* or **.baz.

      Again -- can be used here in place of prefixing each argument with ./.

    • If a file is of a certain type, for example, executable (see man find for more options):

      find . -type f -executable -exec sed -i 's/foo/bar/g' {} +
      

      With zsh:

      sed -i 's/foo/bar/g' ./**/*(D*)
      

    3. Replace only if the string is found in a certain context

    Read the rest at the sourceFrom Unix & Linux Stack Exchange: asked by terdon, answered by terdon (CC BY-SA 4.0)

  • Should I cast the result of malloc (in C)?C

    No; you shouldn’t cast the result, since:

    • It is unnecessary, as void * is automatically and safely promoted to any other pointer type in this case.
    • It adds clutter to the code, casts are not very easy to read (especially if the pointer type is long).
    • It makes you repeat yourself, which is generally bad.
    • It can hide an error if you forgot to include <stdlib.h>. This can cause crashes (or, worse, not cause a crash until way later in some totally different part of the code). Consider what happens if pointers and integers are differently sized; then you're hiding a warning by casting and might lose bits of your returned address. Note: as of C99 implicit functions are gone from C, and this point is no longer relevant since there's no automatic assumption that undeclared functions return int.

    As a clarification, note that I said “you shouldn’t cast”, not “you don't need to cast”. In my opinion, it's a blunder to include the cast, even if you got it right. There are simply no benefits to doing it, but a bunch of potential risks, and including the cast indicates that you don't know about the risks.

    Also note, as commentators point out, that the above talks about straight C, not C++. I very firmly believe in C and C++ as separate languages.

    To add further, your code needlessly repeats the type information (int) which can cause errors. It's better to de-reference the pointer being used to store the return value, to "lock" the two together:

    int *sieve = malloc(length * sizeof *sieve);
    

    Some may say: “Well, previously the type was repeated, and now the variable name is repeated; isn’t this just as repetitive as before? How is that any better?” The difference is that if you one day change the type of the variable and forget to change the type under the sizeof to match, you will silently get an allocation of the wrong size and no warning about it; but if you change the name of the variable, but forget to change the name under sizeof to match, it is more probable that the old name no longer resolves to anything, so your code will stop compiling, prompting you to fix the mistake.

    This also moves the length to the front for increased visibility, and drops the redundant parentheses with sizeof; they are only needed when the argument is a type name. Many people seem to not know (or ignore) this, which makes their code more verbose. Remember: sizeof is not a function! :)

    While moving length to the front may increase visibility in some rare cases, one should also pay attention that in the general case, it should be better to write the expression as:

    int *sieve = malloc(sizeof *sieve * length);
    

    Since keeping the sizeof first, in this case, ensures multiplication is done with at least size_t math.

    Compare: malloc(sizeof *sieve * length * width) vs. malloc(length * width * sizeof *sieve) the second may overflow the length * width when width and length are smaller types than size_t.

    From Stack Overflow: asked by Patrick McDonald, answered by unwind (CC BY-SA 4.0)

  • Why is reading lines from stdin much slower in C++ than Python?C++

    tl;dr: Because of different default settings in C++ requiring more system calls.

    By default, cin is synchronized with stdio, which causes it to avoid any input buffering. If you add this to the top of your main, you should see much better performance:

    std::ios_base::sync_with_stdio(false);
    

    Normally, when an input stream is buffered, instead of reading one character at a time, the stream will be read in larger chunks. This reduces the number of system calls, which are typically relatively expensive. However, since the FILE* based stdio and iostreams often have separate implementations and therefore separate buffers, this could lead to a problem if both were used together. For example:

    int myvalue1;
    cin >> myvalue1;
    int myvalue2;
    scanf("%d",&myvalue2);
    

    If more input was read by cin than it actually needed, then the second integer value wouldn't be available for the scanf function, which has its own independent buffer. This would lead to unexpected results.

    To avoid this, by default, streams are synchronized with stdio. One common way to achieve this is to have cin read each character one at a time as needed using stdio functions. Unfortunately, this introduces a lot of overhead. For small amounts of input, this isn't a big problem, but when you are reading millions of lines, the performance penalty is significant.

    Fortunately, the library designers decided that you should also be able to disable this feature to get improved performance if you knew what you were doing, so they provided the sync_with_stdio method. From this link (emphasis added):

    If the synchronization is turned off, the C++ standard streams are allowed to buffer their I/O independently, which may be considerably faster in some cases.

    From Stack Overflow: asked by JJC, answered by Vaughn Cato (CC BY-SA 4.0)

  • How do I use strings to call functions/methods?Python

    There are various techniques.

    • The best is to use a dictionary that maps strings to functions. The primary advantage of this technique is that the strings do not need to match the names of the functions. This is also the primary technique used to emulate a case construct:

      def a():
          pass
      def b():
          pass
      dispatch = {'go': a, 'stop': b}  # Note lack of parens for funcs
      dispatch[get_input()]()  # Note trailing parens to call function
      
    • Use the built-in function getattr():

      import foo
      getattr(foo, 'bar')()
      

      Note that getattr() works on any object, including classes, class instances, modules, and so on.

      This is used in several places in the standard library, like this:

      class Foo:
          def do_foo(self):
              ...
          def do_bar(self):
              ...
      f = getattr(foo_instance, 'do_' + opname)
      f()
      
    • Use locals() to resolve the function name:

      def myFunc():
          print("hello")
      fname = "myFunc"
      f = locals()[fname]
      f()
      

    From Python Frequently Asked Questions (PSF License Version 2)

  • What are inodes in Linux?Linux

    Inodes in Linux are data structures that store important information about files on a file system. Each file or directory in a Linux file system has an associated inode that contains metadata such as the file's size, permissions, ownership, timestamps, and the location of the file's data blocks on the disk.

    When you create a file or directory, the file system assigns a unique inode number to it. The inode number serves as an identifier for the file, allowing the file system to access the inode's information and manage the file accordingly.

    Here's a summary of what inodes store:

    • File type (regular file, directory, symbolic link, etc.)
    • File permissions (read, write, execute)
    • Ownership (user and group)
    • Timestamps (creation, modification, and access times)
    • File size
    • Number of hard links to the file
    • Location of the file's data blocks on the disk

    It's important to note that inodes don't store the file's name or the actual file data. The file name is stored in the directory that contains the file, which associates the name with the inode number. The actual file data is stored in separate data blocks on the disk, and the inode points to these blocks.

    Inodes play a crucial role in managing files and directories within a Linux file system, providing an efficient way to access and manipulate file metadata.

    From Tech Vault (Apache 2.0)

  • What are your main strengths?Behavioural

    The strengths employers look for will depend on the job role. They may ask you questions like:

    • what are your main strengths?
    • why should we hire you?

    You can use specific examples to highlight your strengths, such as:

    • communication - to show you get on with others
    • problem solving - to show that you can find solutions
    • enthusiasm - to show that you have a positive attitude to work
    • flexibility - to show that you can adapt to different ways of working

    Plan your answers around 2 or 3 examples that are relevant to the job. You can back these up with qualifications or training you've done.

    From National Careers Service: interview advice (Open Government Licence v3.0)

Similar jobs

More like this: Software engineer jobs in Bengaluru (649), Jobs in Bengaluru (10,735) and Software engineer jobs in India (1,457)